mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
remove redundant checks in code
This commit is contained in:
parent
14239c01e4
commit
eb4e674598
@ -35,20 +35,13 @@ var IPython = (function (IPython) {
|
|||||||
SesssionList.prototype.sessions_loaded = function(data){
|
SesssionList.prototype.sessions_loaded = function(data){
|
||||||
this.sessions = {};
|
this.sessions = {};
|
||||||
var len = data.length;
|
var len = data.length;
|
||||||
if (len > 0) {
|
var nb_path;
|
||||||
for (var i=0; i<len; i++) {
|
for (var i=0; i<len; i++) {
|
||||||
var nb_path;
|
nb_path = utils.url_path_join(
|
||||||
if (!data[i].notebook.path) {
|
data[i].notebook.path,
|
||||||
nb_path = data[i].notebook.name;
|
data[i].notebook.name
|
||||||
}
|
);
|
||||||
else {
|
this.sessions[nb_path] = data[i].id;
|
||||||
nb_path = utils.url_path_join(
|
|
||||||
data[i].notebook.path,
|
|
||||||
data[i].notebook.name
|
|
||||||
);
|
|
||||||
}
|
|
||||||
this.sessions[nb_path] = data[i].id;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$([IPython.events]).trigger('sessions_loaded.Dashboard', this.sessions);
|
$([IPython.events]).trigger('sessions_loaded.Dashboard', this.sessions);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user