From b8f9dc07e2211cf206dcd6df01b14ed51281c1aa Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Wed, 29 Oct 2014 11:08:01 -0700 Subject: [PATCH] Fix error callback when deleting file --- IPython/html/static/services/contents.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IPython/html/static/services/contents.js b/IPython/html/static/services/contents.js index cd04d49be..aeff6af05 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);