diff --git a/src/sql/parts/notebook/notebook.component.ts b/src/sql/parts/notebook/notebook.component.ts index 0bcdc965b5..f4b02b8e30 100644 --- a/src/sql/parts/notebook/notebook.component.ts +++ b/src/sql/parts/notebook/notebook.component.ts @@ -168,7 +168,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe } public unselectActiveCell() { - if (this.model.activeCell) { + if (this.model && this.model.activeCell) { this.model.activeCell.active = false; } this._changeRef.detectChanges();