File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/docmanager-extension/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
24
24
provides : IDocumentWidgetOpener ,
25
25
activate : ( app : JupyterFrontEnd ) => {
26
26
const baseUrl = PageConfig . getBaseUrl ( ) ;
27
+ const docRegistry = app . docRegistry ;
27
28
let id = 0 ;
28
29
return new ( class {
29
30
open ( widget : IDocumentWidget , options ?: DocumentRegistry . IOpenOptions ) {
@@ -42,7 +43,8 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
42
43
}
43
44
let url = `${ baseUrl } ${ route } /${ path } ` ;
44
45
// append ?factory only if it's not the default
45
- if ( widgetName !== 'default' ) {
46
+ const defaultFactory = docRegistry . defaultWidgetFactory ( path ) ;
47
+ if ( widgetName !== defaultFactory . name ) {
46
48
url = `${ url } ?factory=${ widgetName } ` ;
47
49
}
48
50
window . open ( url ) ;
You can’t perform that action at this time.
0 commit comments