Przeglądaj źródła

Restore missing variables

Steven Silvester 8 lat temu
rodzic
commit
255cd9bc2e
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      packages/docregistry/src/context.ts

+ 4 - 0
packages/docregistry/src/context.ts

@@ -261,6 +261,7 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo
    * Create a checkpoint for the file.
    */
   createCheckpoint(): Promise<Contents.ICheckpointModel> {
+    let contents = this._manager.contents;
     return this._manager.ready.then(() => {
       return contents.createCheckpoint(this._path);
     });
@@ -270,6 +271,7 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo
    * Delete a checkpoint for the file.
    */
   deleteCheckpoint(checkpointId: string): Promise<void> {
+    let contents = this._manager.contents;
     return this._manager.ready.then(() => {
       return contents.deleteCheckpoint(this._path, checkpointId);
     });
@@ -299,6 +301,7 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo
    * List available checkpoints for a file.
    */
   listCheckpoints(): Promise<Contents.ICheckpointModel[]> {
+    let contents = this._manager.contents;
     return this._manager.ready.then(() => {
       return contents.listCheckpoints(this._path);
     });
@@ -319,6 +322,7 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo
    * Get the download url of a given absolute server path.
    */
   getDownloadUrl(path: string): Promise<string> {
+    let contents = this._manager.contents;
     if (URLExt.isLocal(path)) {
       return this._manager.ready.then(() => contents.getDownloadUrl(path));
     }