Browse Source

Guarantee that the create/open ready promise is never null.

Afshin Darian 7 years ago
parent
commit
a8d7aa8005
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/docmanager/src/manager.ts

+ 1 - 1
packages/docmanager/src/manager.ts

@@ -468,7 +468,7 @@ class DocumentManager implements IDisposable {
     );
     );
 
 
     let context: Private.IContext | null = null;
     let context: Private.IContext | null = null;
-    let ready: Promise<void> | null = null;
+    let ready: Promise<void> = Promise.resolve(undefined);
 
 
     // Handle the load-from-disk case
     // Handle the load-from-disk case
     if (which === 'open') {
     if (which === 'open') {