diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index cd70b6c985..a0f1987745 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -517,7 +517,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { translator: ITranslator | null, notebookTools: INotebookTools | null ) => { - const { commands } = app; + const { commands, shell } = app; translator = translator ?? nullTranslator; const trans = translator.load('notebook'); @@ -549,8 +549,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { }); } }, - isEnabled: () => { app.shell.currentWidget !== null && - app.shell.currentWidget instanceof NotebookPanel } + isEnabled: () => shell.currentWidget !== null && shell.currentWidget instanceof NotebookPanel }); if (palette) {