fix: clear note change listener on editor vie deinit
This commit is contained in:
@@ -82,6 +82,10 @@ export class Editor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public clearNoteChangeListener() {
|
||||||
|
this._onNoteChange = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register to be notified when the editor's note's values change
|
* Register to be notified when the editor's note's values change
|
||||||
* (and thus a new object reference is created)
|
* (and thus a new object reference is created)
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deinit() {
|
deinit() {
|
||||||
|
this.editor.clearNoteChangeListener();
|
||||||
this.removeTagsObserver();
|
this.removeTagsObserver();
|
||||||
this.removeComponentsObserver();
|
this.removeComponentsObserver();
|
||||||
(this.removeTagsObserver as any) = undefined;
|
(this.removeTagsObserver as any) = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user