Parcourir la source

Fix case where contentsModel has not been loaded yet.

Ian Rose il y a 7 ans
Parent
commit
17ef66327d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      packages/docmanager-extension/src/index.ts

+ 1 - 1
packages/docmanager-extension/src/index.ts

@@ -144,7 +144,7 @@ function addCommands(app: JupyterLab, docManager: IDocumentManager, palette: ICo
     }
     // TODO: we should consider eliding the name
     // if it is very long.
-    return `"${context.contentsModel.name}"`;
+    return `"${currentWidget.title.label}"`;
   };
 
   commands.addCommand(CommandIDs.close, {