Permalink
Browse files

Fix Connexion class: commited ES6 in ES5 context.

  • Loading branch information...
1 parent ab5a844 commit 718bca40c16df98bebd492175fc9bbb72e54b646 @cdujeu cdujeu committed Sep 22, 2016
Oops, something went wrong.
@@ -217,7 +217,9 @@ Class.create("Connexion", {
document.fire("ajaxplorer:server_answer", this);
},
- uploadFile: function(file, fileParameterName, uploadUrl, onComplete, onError, onProgress, xhrSettings={}){
+ uploadFile: function(file, fileParameterName, uploadUrl, onComplete, onError, onProgress, xhrSettings){
+
+ if(xhrSettings === undefined) xhrSettings = {};
if(!onComplete) onComplete = function(){};
if(!onError) onError = function(){};
@@ -238,7 +240,10 @@ Class.create("Connexion", {
},
- initializeXHRForUpload : function(url, onComplete, onError, onProgress, xhrSettings={}){
+ initializeXHRForUpload : function(url, onComplete, onError, onProgress, xhrSettings){
+
+ if(xhrSettings === undefined) xhrSettings = {};
+
var xhr = new XMLHttpRequest();
var upload = xhr.upload;
if(xhrSettings.withCredentials){

0 comments on commit 718bca4

Please sign in to comment.