Skip to content

Commit

Permalink
Fix spurious kernel selection dialog on notebook creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Feb 13, 2024
1 parent 9348f1f commit 8490a93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/docmanager-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
widgetName.includes('Notebook')
) {
// make sure to save the notebook before opening it in a new tab
// so the kernel info is saved
await widget.context.save();
// so the kernel info is saved (if created from the New dropdown)
if (widget.context.sessionContext.kernelPreference.name) {
await widget.context.save();
}
route = 'notebooks';
}
// append ?factory only if it's not the default
Expand Down

0 comments on commit 8490a93

Please sign in to comment.