Skip to content

Commit b8ec7e4

Browse files
authored
Fix spurious kernel selection dialog on notebook creation (#7258)
* Fix spurious kernel selection dialog on notebook creation * fix snapshots
1 parent 9348f1f commit b8ec7e4

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

packages/docmanager-extension/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
5858
widgetName.includes('Notebook')
5959
) {
6060
// make sure to save the notebook before opening it in a new tab
61-
// so the kernel info is saved
62-
await widget.context.save();
61+
// so the kernel info is saved (if created from the New dropdown)
62+
if (widget.context.sessionContext.kernelPreference.name) {
63+
await widget.context.save();
64+
}
6365
route = 'notebooks';
6466
}
6567
// append ?factory only if it's not the default
Loading
Loading

0 commit comments

Comments
 (0)