dce-reactkit 3.7.38 → 3.8.0
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/cjs/index.js +12 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +12 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/visitServerEndpoint.tsx +15 -1
package/dist/cjs/index.js
CHANGED
|
@@ -796,10 +796,21 @@ const visitServerEndpoint = (opts) => __awaiter(void 0, void 0, void 0, function
|
|
|
796
796
|
if (opts.params) {
|
|
797
797
|
params = Object.fromEntries(Object
|
|
798
798
|
.entries(opts.params)
|
|
799
|
-
.filter(([
|
|
799
|
+
.filter(([, value]) => {
|
|
800
800
|
return value !== undefined;
|
|
801
801
|
}));
|
|
802
802
|
}
|
|
803
|
+
// Automatically JSONify arrays and objects
|
|
804
|
+
if (params) {
|
|
805
|
+
params = Object.fromEntries(Object
|
|
806
|
+
.entries(params)
|
|
807
|
+
.map(([key, value]) => {
|
|
808
|
+
if (Array.isArray(value) || typeof value === 'object') {
|
|
809
|
+
return [key, JSON.stringify(value)];
|
|
810
|
+
}
|
|
811
|
+
return [key, value];
|
|
812
|
+
}));
|
|
813
|
+
}
|
|
803
814
|
// Send the request
|
|
804
815
|
const sendRequest = yield getSendRequest();
|
|
805
816
|
const response = yield sendRequest({
|