@sasjs/adapter 3.7.4 → 3.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  "https": "1.0.0",
81
81
  "tough-cookie": "4.0.0"
82
82
  },
83
- "version": "3.7.4"
83
+ "version": "3.7.5"
84
84
  }
@@ -151,7 +151,7 @@ export class WebJobExecutor extends BaseJobExecutor {
151
151
 
152
152
  /* The NodeFormData object does not set the request header - so, set it */
153
153
  const contentType =
154
- formData instanceof NodeFormData
154
+ formData instanceof NodeFormData && typeof FormData === 'undefined'
155
155
  ? `multipart/form-data; boundary=${formData.getBoundary()}`
156
156
  : undefined
157
157
 
@@ -12,6 +12,8 @@ export const getValidJson = (str: string | object): object => {
12
12
 
13
13
  if (typeof str === 'object') return str
14
14
 
15
+ if (str === '') return {}
16
+
15
17
  return JSON.parse(str)
16
18
  } catch (e) {
17
19
  if (e instanceof JsonParseArrayError) throw e