mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
Undelegate old events when refreshing history
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user