|
@@ -235,7 +235,8 @@ function addCommands(app: JupyterLab, services: IServiceManager, tracker: Notebo
|
|
|
// Get the current widget and activate unless the args specify otherwise.
|
|
|
function getCurrent(args: JSONObject): NotebookPanel | null {
|
|
|
let widget = tracker.currentWidget;
|
|
|
- if (widget && (args['activate'] !== false)) {
|
|
|
+ let activate = !args || args && args['activate'] !== false;
|
|
|
+ if (activate && widget) {
|
|
|
widget.activate();
|
|
|
}
|
|
|
return widget;
|