null checks for onBeforeDetached (#7782)

This commit is contained in:
Chris LaFreniere
2019-10-17 18:24:30 -07:00
committed by GitHub
parent 9bdaba3b65
commit 2ee04e0cf0

View File

@@ -398,7 +398,7 @@ export class NotebookInput extends EditorInput {
}
public dispose(): void {
if (this._model) {
if (this._model && this._model.editorModel && this._model.editorModel.textEditorModel) {
this._model.editorModel.textEditorModel.onBeforeDetached();
}
this._disposeContainer();