diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index dda0ddfc609ed94404286aa65cbd0d811690da58..38363d5d2d23f91023d1393e3a4293af4afb576e 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -197,6 +197,7 @@ export class NotebookContribution extends Disposable implements IWorkbenchContri const visibleNotebookEditors = editorService.visibleEditorPanes .filter(pane => (pane as any).isNotebookEditor) .map(pane => pane.getControl() as INotebookEditor) + .filter(control => !!control) .map(editor => editor.getId()); this.notebookService.updateVisibleNotebookEditor(visibleNotebookEditors);