diff --git a/src/vs/workbench/api/browser/mainThreadNotebook.ts b/src/vs/workbench/api/browser/mainThreadNotebook.ts index 9313542a885..0db3c42cf4b 100644 --- a/src/vs/workbench/api/browser/mainThreadNotebook.ts +++ b/src/vs/workbench/api/browser/mainThreadNotebook.ts @@ -184,7 +184,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo const activeEditorPane = this.editorService.activeEditorPane as any | undefined; if (activeEditorPane?.isNotebookEditor) { - const notebookEditor = (activeEditorPane as INotebookEditor); + const notebookEditor = (activeEditorPane.getControl() as INotebookEditor); if (notebookEditor.viewModel?.handle === handle) { notebookEditor.postMessage(value);