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> = {
2424 provides : IDocumentWidgetOpener ,
2525 activate : ( app : JupyterFrontEnd ) => {
2626 const baseUrl = PageConfig . getBaseUrl ( ) ;
27+ const docRegistry = app . docRegistry ;
2728 let id = 0 ;
2829 return new ( class {
2930 open ( widget : IDocumentWidget , options ?: DocumentRegistry . IOpenOptions ) {
@@ -42,7 +43,8 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
4243 }
4344 let url = `${ baseUrl } ${ route } /${ path } ` ;
4445 // append ?factory only if it's not the default
45- if ( widgetName !== 'default' ) {
46+ const defaultFactory = docRegistry . defaultWidgetFactory ( path ) ;
47+ if ( widgetName !== defaultFactory . name ) {
4648 url = `${ url } ?factory=${ widgetName } ` ;
4749 }
4850 window . open ( url ) ;
You can’t perform that action at this time.
0 commit comments