@heymantle/core-api-client 0.1.22 → 0.1.23

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
@@ -185,7 +185,9 @@ function toQueryString(params) {
185
185
  const searchParams = new URLSearchParams();
186
186
  for (const [key, value] of Object.entries(sanitized)) {
187
187
  if (Array.isArray(value)) {
188
- value.forEach((v) => searchParams.append(key, String(v)));
188
+ if (value.length > 0) {
189
+ searchParams.append(key, value.map(String).join(","));
190
+ }
189
191
  } else if (value !== null && value !== void 0) {
190
192
  searchParams.append(key, String(value));
191
193
  }
package/dist/index.mjs CHANGED
@@ -119,7 +119,9 @@ function toQueryString(params) {
119
119
  const searchParams = new URLSearchParams();
120
120
  for (const [key, value] of Object.entries(sanitized)) {
121
121
  if (Array.isArray(value)) {
122
- value.forEach((v) => searchParams.append(key, String(v)));
122
+ if (value.length > 0) {
123
+ searchParams.append(key, value.map(String).join(","));
124
+ }
123
125
  } else if (value !== null && value !== void 0) {
124
126
  searchParams.append(key, String(value));
125
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heymantle/core-api-client",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "TypeScript SDK for the Mantle Core API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",