aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/requests/requests.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/utils/requests/requests.ts')
-rw-r--r--shared/utils/requests/requests.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/utils/requests/requests.ts b/shared/utils/requests/requests.ts
index dc2d4abe5..3532fb429 100644
--- a/shared/utils/requests/requests.ts
+++ b/shared/utils/requests/requests.ts
@@ -77,6 +77,8 @@ function makeUploadRequest (options: {
77 Object.keys(options.fields).forEach(field => { 77 Object.keys(options.fields).forEach(field => {
78 const value = options.fields[field] 78 const value = options.fields[field]
79 79
80 if (value === undefined) return
81
80 if (Array.isArray(value)) { 82 if (Array.isArray(value)) {
81 for (let i = 0; i < value.length; i++) { 83 for (let i = 0; i < value.length; i++) {
82 req.field(field + '[' + i + ']', value[i]) 84 req.field(field + '[' + i + ']', value[i])