Skip to content

Commit c52b230

Browse files
mariobuikhuizenmartinRenou
authored andcommitted
fix: restoring widgets from saved state is broken since v8
In 9d999d7 waiting for sessionContext.ready was removed, this caused _loadNotebook() not to work, because it was called before the widget metadata was available. This commit restores waiting for sessionContext.ready. This has to be before _loadFromKernel(), otherwise this.kernel is not present, causing an exeption, skipping _loadNotebook(). Fixes: jupyterlab/jupyterlab#15361
1 parent b253179 commit c52b230

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/jupyterlab_widgets/src/manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ export class WidgetManager extends LabWidgetManager {
496496
{ loadKernel, loadNotebook } = { loadKernel: true, loadNotebook: true }
497497
): Promise<void> {
498498
try {
499+
await this.context.sessionContext.ready;
499500
if (loadKernel) {
500501
try {
501502
this._kernelRestoreInProgress = true;

0 commit comments

Comments
 (0)