##// END OF EJS Templates
Fix error callback when deleting file
Thomas Kluyver -
Show More
@@ -112,7 +112,7 b' define(['
112 };
112 };
113
113
114 Contents.prototype.delete_file = function(name, path, options) {
114 Contents.prototype.delete_file = function(name, path, options) {
115 var error = options.error || function() {};
115 var error_callback = options.error || function() {};
116 var that = this;
116 var that = this;
117 var settings = {
117 var settings = {
118 processData : false,
118 processData : false,
@@ -124,9 +124,9 b' define(['
124 // TODO: update IPEP27 to specify errors more precisely, so
124 // TODO: update IPEP27 to specify errors more precisely, so
125 // that error types can be detected here with certainty.
125 // that error types can be detected here with certainty.
126 if (xhr.status === 400) {
126 if (xhr.status === 400) {
127 error(new Contents.DirectoryNotEmptyError());
127 error_callback(new Contents.DirectoryNotEmptyError());
128 }
128 }
129 error(utils.wrap_ajax_error(xhr, status, error));
129 error_callback(utils.wrap_ajax_error(xhr, status, error));
130 }
130 }
131 };
131 };
132 var url = this.api_url(path, name);
132 var url = this.api_url(path, name);
General Comments 0
You need to be logged in to leave comments. Login now