Skip to content

Commit df8a548

Browse files
committed
Some improvements to promise handling when saving notebook
1 parent c33130d commit df8a548

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

notebook/static/notebook/js/notebook.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2742,6 +2742,8 @@ define([
27422742
$.proxy(that.save_notebook_success, that, start),
27432743
function (error) {
27442744
that.events.trigger('notebook_save_failed.Notebook', error);
2745+
// This hasn't handled the error, so propagate it up
2746+
return Promise.reject(error);
27452747
}
27462748
);
27472749
};
@@ -2845,6 +2847,7 @@ define([
28452847
this.create_checkpoint();
28462848
this._checkpoint_after_save = false;
28472849
}
2850+
return data;
28482851
};
28492852

28502853
Notebook.prototype.save_notebook_as = function() {
@@ -3309,7 +3312,7 @@ define([
33093312
*/
33103313
Notebook.prototype.save_checkpoint = function () {
33113314
this._checkpoint_after_save = true;
3312-
this.save_notebook(true);
3315+
return this.save_notebook(true);
33133316
};
33143317

33153318
/**

0 commit comments

Comments
 (0)