Skip to content

Commit

Permalink
Fix spurious kernel selection dialog on notebook creation (#7258)
Browse files Browse the repository at this point in the history
* Fix spurious kernel selection dialog on notebook creation

* fix snapshots
  • Loading branch information
jtpio committed Feb 13, 2024
1 parent 9348f1f commit b8ec7e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/docmanager-extension/src/index.ts
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b8ec7e4

Please sign in to comment.