Files should be an empty array by default

This commit is contained in:
trading_peter 2025-01-17 11:08:15 +01:00
parent 9cf25a6666
commit 9c1ee77a20
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@tp/helpers",
"version": "2.3.1",
"version": "2.3.2",
"description": "",
"main": "closest.js",
"scripts": {

View File

@ -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();