@kohost/api-client 4.0.6 → 4.0.7

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/index.js CHANGED
@@ -1022,7 +1022,7 @@ var KohostHTTPClient = class _KohostHTTPClient {
1022
1022
  headers.set(key, config.headers[key]);
1023
1023
  });
1024
1024
  }
1025
- const body = ["POST", "PUT", "PATCH"].includes(method) ? headers.get("Content-Type") === "application/json" ? JSON.stringify(config.data) : config.data : void 0;
1025
+ const body = config.data !== null && ["POST", "PUT", "PATCH"].includes(method) ? headers.get("Content-Type") === "application/json" ? JSON.stringify(config.data) : config.data : void 0;
1026
1026
  const request = new Request(url, {
1027
1027
  method,
1028
1028
  headers,