From 255fdea920a23289efbcf486064d58c40ca2834a Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 8 Jun 2020 12:52:27 -0700 Subject: [PATCH] getControl can return undefined. --- .../workbench/contrib/notebook/browser/notebook.contribution.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index dda0ddfc609..38363d5d2d2 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); -- GitLab