Browse Source

Fix case where contentsModel has not been loaded yet.

Ian Rose 7 years ago
parent
commit
17ef66327d
1 changed files with 1 additions and 1 deletions
  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, {