From 44bc7a89df6ce9725e712c8772763d474fd1a361 Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Fri, 4 Oct 2019 15:33:37 -0700 Subject: [PATCH] Register Notebook Editor Model during instantiation (#6891) --- .../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 95e58a61aa..8f60deb397 100644 --- a/src/sql/workbench/parts/notebook/browser/models/notebookInput.ts +++ b/src/sql/workbench/parts/notebook/browser/models/notebookInput.ts @@ -354,7 +354,7 @@ export class NotebookInput extends EditorInput { textEditorModelReference.object.textEditorModel.onBeforeAttached(); textOrUntitledEditorModel = await textEditorModelReference.object.load(); } - this._model = this.instantiationService.createInstance(NotebookEditorModel, this.resource, textOrUntitledEditorModel); + this._model = this._register(this.instantiationService.createInstance(NotebookEditorModel, this.resource, textOrUntitledEditorModel)); this.hookDirtyListener(this._model.onDidChangeDirty, () => this._onDidChangeDirty.fire()); this._modelResolved.resolve(); return this._model;