Merge pull request #7650 from minrk/initial-kernel

don't prevent spec_changed from firing on load
This commit is contained in:
Min RK 2015-01-31 15:59:42 -08:00
commit 1ca890e16c
2 changed files with 3 additions and 2 deletions

View File

@ -218,7 +218,8 @@ define([
return;
}
}
if (this.notebook._session_starting) {
if (this.notebook._session_starting &&
this.notebook.session.kernel.name !== ks.name) {
console.error("Cannot change kernel while waiting for pending session start.");
return;
}

View File

@ -232,7 +232,7 @@ define(function (require) {
language: data.spec.language,
};
// start session if the current session isn't already correct
if (!(this.session && this.session.kernel && this.session.kernel.name === data.name)) {
if (!(that.session && that.session.kernel && that.session.kernel.name === data.name)) {
that.start_session(data.name);
}
});