Fixed #4206 and #4207 open and close notebook quickly issue #4240 (#4255)

* Fixed  #4206 and #4207

* Check if it makes my PR run tests

* Add isReady to JupyterSessionManager
This commit is contained in:
Yurong He
2019-03-04 12:46:27 -08:00
committed by GitHub
parent b4984d7f2d
commit a48e9bc64c
2 changed files with 8 additions and 3 deletions

View File

@@ -728,7 +728,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
for (let i = 0; i < this.notebookManagers.length; i++) {
if (this.notebookManagers[i].sessionManager && this.notebookManagers[i].sessionManager.specs && this.notebookManagers[i].sessionManager.specs.kernels) {
let index = this.notebookManagers[i].sessionManager.specs.kernels.findIndex(kernel => kernel.name === kernelSpec.name);
if (index >= 0) {
if (index >= 0 && this._clientSessions && this._clientSessions.length > 0) {
if (this._activeClientSession) {
this._oldClientSession = this._activeClientSession;
}