aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/requests/requests.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/requests/requests.ts')
-rw-r--r--shared/extra-utils/requests/requests.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts
index 0e9d67f0b..6b00871e0 100644
--- a/shared/extra-utils/requests/requests.ts
+++ b/shared/extra-utils/requests/requests.ts
@@ -63,7 +63,7 @@ function makeUploadRequest (options: {
63 path: string 63 path: string
64 token?: string 64 token?: string
65 fields: { [ fieldName: string ]: any } 65 fields: { [ fieldName: string ]: any }
66 attaches: { [ attachName: string ]: any | any[] } 66 attaches?: { [ attachName: string ]: any | any[] }
67 statusCodeExpected?: number 67 statusCodeExpected?: number
68}) { 68}) {
69 if (!options.statusCodeExpected) options.statusCodeExpected = 400 69 if (!options.statusCodeExpected) options.statusCodeExpected = 400
@@ -93,7 +93,7 @@ function makeUploadRequest (options: {
93 } 93 }
94 }) 94 })
95 95
96 Object.keys(options.attaches).forEach(attach => { 96 Object.keys(options.attaches || {}).forEach(attach => {
97 const value = options.attaches[attach] 97 const value = options.attaches[attach]
98 if (Array.isArray(value)) { 98 if (Array.isArray(value)) {
99 req.attach(attach, buildAbsoluteFixturePath(value[0]), value[1]) 99 req.attach(attach, buildAbsoluteFixturePath(value[0]), value[1])