don't prevent spec_changed from firing on load

fixes check for the case where kernelspec info is coming from the kernel,
rather than notebook metadata.

This case was getting skipped by a bad check on `_session_starting`.
This commit is contained in:
Min RK 2015-01-31 14:27:15 -08:00
parent e48d772063
commit 0ef85028d7
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);
}
});