diff --git a/package.json b/package.json index 24ef5ea..42fc3af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/helpers", - "version": "2.3.1", + "version": "2.3.2", "description": "", "main": "closest.js", "scripts": { diff --git a/upload-files.js b/upload-files.js index 6004583..1f1284c 100644 --- a/upload-files.js +++ b/upload-files.js @@ -8,7 +8,7 @@ export const upload = function(superClass) { * @param {Object} opts Upload options * @returns Promise */ - uploadFiles(url, files, data = {}) { + uploadFiles(url, files = [], data = {}) { return new Promise((resolve, reject) => { const request = new XMLHttpRequest(); const formData = new FormData();