@hyper-fetch/core 7.5.1 → 7.5.2
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/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/adapter/adapter.utils.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -2597,8 +2597,9 @@ var stringifyValue = (response) => {
|
|
|
2597
2597
|
};
|
|
2598
2598
|
var getAdapterHeaders = (request) => {
|
|
2599
2599
|
const isFormData = hasWindow() && request.payload instanceof FormData;
|
|
2600
|
+
const isObject = typeof request.payload === "object" && request.payload !== null;
|
|
2600
2601
|
const headers = {};
|
|
2601
|
-
if (!isFormData) headers["Content-Type"] = "application/json";
|
|
2602
|
+
if (!isFormData && isObject) headers["Content-Type"] = "application/json";
|
|
2602
2603
|
Object.assign(headers, request.headers);
|
|
2603
2604
|
return headers;
|
|
2604
2605
|
};
|