diff --git a/app/assets/javascripts/ui_models/editor.ts b/app/assets/javascripts/ui_models/editor.ts index f368618e8..56b68685c 100644 --- a/app/assets/javascripts/ui_models/editor.ts +++ b/app/assets/javascripts/ui_models/editor.ts @@ -82,6 +82,10 @@ export class Editor { } } + public clearNoteChangeListener() { + this._onNoteChange = undefined; + } + /** * Register to be notified when the editor's note's values change * (and thus a new object reference is created) diff --git a/app/assets/javascripts/views/editor/editor_view.ts b/app/assets/javascripts/views/editor/editor_view.ts index 5dc9cdd6d..8d8f21324 100644 --- a/app/assets/javascripts/views/editor/editor_view.ts +++ b/app/assets/javascripts/views/editor/editor_view.ts @@ -144,6 +144,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope { } deinit() { + this.editor.clearNoteChangeListener(); this.removeTagsObserver(); this.removeComponentsObserver(); (this.removeTagsObserver as any) = undefined;