From 2ee04e0cf0df75201503a3e6abe868f5a1ad5a2f Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Thu, 17 Oct 2019 18:24:30 -0700 Subject: [PATCH] null checks for onBeforeDetached (#7782) --- .../workbench/parts/notebook/browser/models/notebookInput.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/parts/notebook/browser/models/notebookInput.ts b/src/sql/workbench/parts/notebook/browser/models/notebookInput.ts index a986574f15..c1b12a75f4 100644 --- a/src/sql/workbench/parts/notebook/browser/models/notebookInput.ts +++ b/src/sql/workbench/parts/notebook/browser/models/notebookInput.ts @@ -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();