@xtreamr/cla-request
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.0.5](https://github.com/pacorampas/la_modules/compare/@xtreamr/cla-request@1.0.4...@xtreamr/cla-request@1.0.5) (2021-09-03) | ||
### Bug Fixes | ||
* **cla-request:** into fetch mock not json parse if body is a form data instance ([0ba984e](https://github.com/pacorampas/la_modules/commit/0ba984e97a77a26104b8bad6050b93a9459f8a9b)) | ||
## [1.0.4](https://github.com/pacorampas/la_modules/compare/@xtreamr/cla-request@1.0.3...@xtreamr/cla-request@1.0.4) (2021-08-13) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@xtreamr/cla-request", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"main": "index.js", | ||
@@ -30,3 +30,3 @@ "module": "es/index.js", | ||
}, | ||
"gitHead": "a67d01b41d044934ceff9e34c872411a96437e2d" | ||
"gitHead": "f932158ff0804dc73858baa99d8b49a04bb0917d" | ||
} |
@@ -11,3 +11,4 @@ import qs from 'qs' | ||
console.log('[Mock] Api call', { path, pattern, query, parameters, method: optionsFetch.method }) | ||
const body = optionsFetch.body ? JSON.parse(optionsFetch.body) : optionsFetch.body | ||
const isFormDataInstance = optionsFetch.body instanceof FormData | ||
const body = optionsFetch.body && !isFormDataInstance ? JSON.parse(optionsFetch.body) : optionsFetch.body | ||
const mockApiCall = mockData[pattern]({ query, parameters, optionsFetch: { ...optionsFetch, body } }) | ||
@@ -14,0 +15,0 @@ await delay((mockOptions && mockOptions.delay) || 0) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232819
4098