summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js/mountsfilelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/js/mountsfilelist.js')
-rw-r--r--apps/files_external/js/mountsfilelist.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js
index 70b5b81e65b..0f61f78aac8 100644
--- a/apps/files_external/js/mountsfilelist.js
+++ b/apps/files_external/js/mountsfilelist.js
@@ -65,7 +65,6 @@
},
reload: function() {
- var self = this;
this.showMask();
if (this._reloadCall) {
this._reloadCall.abort();
@@ -78,14 +77,10 @@
type: 'GET',
beforeSend: function(xhr) {
xhr.setRequestHeader('OCS-APIREQUEST', 'true');
- },
- error: function(result) {
- self.reloadCallback(result);
- },
- success: function(result) {
- self.reloadCallback(result);
}
});
+ var callBack = this.reloadCallback.bind(this);
+ return this._reloadCall.then(callBack, callBack);
},
reloadCallback: function(result) {