From b6a07144590a1954962bc5f9af76d315b63c49a7 Mon Sep 17 00:00:00 2001 From: Vlad Babich Date: Tue, 7 Dec 2021 15:46:40 -0700 Subject: [PATCH] Fix add to active notebook --- packages/dashboard-core-plugins/src/ConsolePlugin.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/dashboard-core-plugins/src/ConsolePlugin.tsx b/packages/dashboard-core-plugins/src/ConsolePlugin.tsx index cb469f4bdd..4a926d63c7 100644 --- a/packages/dashboard-core-plugins/src/ConsolePlugin.tsx +++ b/packages/dashboard-core-plugins/src/ConsolePlugin.tsx @@ -426,7 +426,9 @@ export const ConsolePlugin = ({ /** Attempts to send the text to a notebook matching the passed in settings */ const sendToNotebook = useCallback( (session, sessionLanguage, settings = {}, createIfNecessary = true) => { - const notebookPanel = panelManager.getLastUsedPanelOfType(NotebookPanel); + const notebookPanel = panelManager.getLastUsedPanelOfType( + NotebookPanel.WrappedComponent + ); if (notebookPanel && isNotebookPanel(notebookPanel)) { if (settings && settings.value && notebookPanel.notebook) { notebookPanel.notebook.append(settings.value);