dce-reactkit 3.7.36 → 3.7.37
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 +10 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +10 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/visitServerEndpoint.tsx +13 -1
package/package.json
CHANGED
|
@@ -123,12 +123,24 @@ const visitServerEndpoint = async (
|
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// Remove properties with undefined values
|
|
127
|
+
let params: { [key in string]: any } | undefined;
|
|
128
|
+
if (opts.params) {
|
|
129
|
+
params = Object.fromEntries(
|
|
130
|
+
Object
|
|
131
|
+
.entries(opts.params)
|
|
132
|
+
.filter(([key, value]) => {
|
|
133
|
+
return value !== undefined;
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
126
138
|
// Send the request
|
|
127
139
|
const sendRequest = await getSendRequest();
|
|
128
140
|
const response = await sendRequest({
|
|
129
141
|
path: opts.path,
|
|
130
142
|
method: opts.method ?? 'GET',
|
|
131
|
-
params
|
|
143
|
+
params,
|
|
132
144
|
});
|
|
133
145
|
|
|
134
146
|
// Check for failure
|