|
@@ -286,7 +286,9 @@ function addCommands(app: JupyterLab, palette: ICommandPalette): void {
|
|
app.shell.expandLeft();
|
|
app.shell.expandLeft();
|
|
} else {
|
|
} else {
|
|
app.shell.collapseLeft();
|
|
app.shell.collapseLeft();
|
|
- app.shell.activateById(app.shell.currentWidget.id);
|
|
|
|
|
|
+ if (app.shell.currentWidget) {
|
|
|
|
+ app.shell.activateById(app.shell.currentWidget.id);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isToggled: () => !app.shell.leftCollapsed,
|
|
isToggled: () => !app.shell.leftCollapsed,
|
|
@@ -302,7 +304,9 @@ function addCommands(app: JupyterLab, palette: ICommandPalette): void {
|
|
app.shell.expandRight();
|
|
app.shell.expandRight();
|
|
} else {
|
|
} else {
|
|
app.shell.collapseRight();
|
|
app.shell.collapseRight();
|
|
- app.shell.activateById(app.shell.currentWidget.id);
|
|
|
|
|
|
+ if (app.shell.currentWidget) {
|
|
|
|
+ app.shell.activateById(app.shell.currentWidget.id);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isToggled: () => !app.shell.rightCollapsed,
|
|
isToggled: () => !app.shell.rightCollapsed,
|