Sfoglia il codice sorgente

Merge pull request #2204 from markroth8/nokernel

Fix Kernel name indicator fails when Kernel switched to "No Kernel"
Brian E. Granger 8 anni fa
parent
commit
87b156ab98
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      packages/apputils/src/clientsession.ts

+ 3 - 3
packages/apputils/src/clientsession.ts

@@ -580,7 +580,7 @@ class ClientSession implements IClientSession {
         return;
       }
       if (model === null && this._session) {
-        return this.shutdown();
+        return this.shutdown().then(() => this._kernelChanged.emit(null));
       }
       return this._changeKernel(model).then(() => void 0);
     }).then(() => void 0);
@@ -595,8 +595,8 @@ class ClientSession implements IClientSession {
     }
     return this.manager.startNew({
       path: this._path,
-      kernelName: model.name,
-      kernelId: model.id
+      kernelName: model ? model.name : null,
+      kernelId: model ? model.id : null
     }).then(session => this._handleNewSession(session))
     .catch(err => this._handleSessionError(err));
   }