Skip to content

Commit

Permalink
Fix console restoration.
Browse files Browse the repository at this point in the history
  • Loading branch information
afshin committed Jan 3, 2020
1 parent f394e24 commit c905f3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/console-extension/src/index.ts
Expand Up @@ -169,7 +169,7 @@ async function activateConsole(
kernelPreference: { ...kernelPreference }
};
},
name: widget => widget.console.sessionContext.session?.path ?? UUID.uuid4(),
name: widget => widget.console.sessionContext.path ?? UUID.uuid4(),
when: manager.ready
});

Expand Down Expand Up @@ -268,7 +268,9 @@ async function activateConsole(
// Add the console panel to the tracker. We want the panel to show up before
// any kernel selection dialog, so we do not await panel.session.ready;
await tracker.add(panel);
panel.sessionContext.propertyChanged.connect(() => tracker.save(panel));
panel.sessionContext.propertyChanged.connect(() => {
void tracker.save(panel);
});

shell.add(panel, 'main', {
ref: options.ref,
Expand Down

0 comments on commit c905f3f

Please sign in to comment.