Remove `?factory` when it is the default

pull/6315/head
Jeremy Tuloup 4 years ago
parent 0e4fd20840
commit d9e050f61a

@ -47,7 +47,12 @@ const opener: JupyterFrontEndPlugin<void> = {
) {
route = 'notebooks';
}
window.open(`${baseUrl}${route}/${path}?factory=${widgetName}`);
let url = `${baseUrl}${route}/${path}`;
// append ?factory only if it's not the default
if (widgetName !== 'default') {
url = `${url}?factory=${widgetName}`;
}
window.open(url);
return undefined;
};
}

Loading…
Cancel
Save