Skip to content

Commit 7dbc6ec

Browse files
authored
Fix microsoft#187447. Avoid npe for reading notebook pane (microsoft#187491)
1 parent de6f24c commit 7dbc6ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ export function getNotebookEditorFromEditorPane(editorPane?: IEditorPane): INote
806806
const input = editorPane.input;
807807

808808
if (input && isCompositeNotebookEditorInput(input)) {
809-
return (editorPane.getControl() as { notebookEditor: INotebookEditor | undefined }).notebookEditor;
809+
return (editorPane.getControl() as { notebookEditor: INotebookEditor | undefined } | undefined)?.notebookEditor;
810810
}
811811

812812
return undefined;

0 commit comments

Comments
 (0)