mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:01:52 +00:00
Undelegate old events when refreshing history
This commit is contained in:
parent
fe99be48ac
commit
dfdfba4b2e
2 changed files with 6 additions and 0 deletions
|
@ -43,6 +43,9 @@ define [
|
|||
overflow: "scroll"
|
||||
this
|
||||
|
||||
remove: () ->
|
||||
@undelegateEvents()
|
||||
|
||||
addItem: (model) ->
|
||||
index = @collection.indexOf(model)
|
||||
previousModel = @collection.models[index - 1]
|
||||
|
|
|
@ -47,6 +47,9 @@ define [
|
|||
show: () ->
|
||||
@changes = new ChangeList([], project_id: @project_id, ide: @ide)
|
||||
|
||||
if @changeListView?
|
||||
@changeListView.remove()
|
||||
|
||||
@changeListView = new ChangeListView(
|
||||
el: @$el.find(".change-list-area")
|
||||
collection: @changes
|
||||
|
|
Loading…
Reference in a new issue