From eb86114bb2f9bb75664840c542f31dca5c322d9e 2014-11-03 18:19:51 From: Thomas Kluyver Date: 2014-11-03 18:19:51 Subject: [PATCH] Fix error callback when deleting file --- diff --git a/IPython/html/static/services/contents.js b/IPython/html/static/services/contents.js index cd04d49..aeff6af 100644 --- a/IPython/html/static/services/contents.js +++ b/IPython/html/static/services/contents.js @@ -112,7 +112,7 @@ define([ }; Contents.prototype.delete_file = function(name, path, options) { - var error = options.error || function() {}; + var error_callback = options.error || function() {}; var that = this; var settings = { processData : false, @@ -124,9 +124,9 @@ define([ // TODO: update IPEP27 to specify errors more precisely, so // that error types can be detected here with certainty. if (xhr.status === 400) { - error(new Contents.DirectoryNotEmptyError()); + error_callback(new Contents.DirectoryNotEmptyError()); } - error(utils.wrap_ajax_error(xhr, status, error)); + error_callback(utils.wrap_ajax_error(xhr, status, error)); } }; var url = this.api_url(path, name);