Skip to content

Commit 8f165f1

Browse files
committed
fix(dfx-openapi): Prevent orphan ampersands in query from empty arrays
Fixes applied from: openapi-ts/openapi-typescript#1936
1 parent 2d029a0 commit 8f165f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libs/dfx-openapi/src/lib/client.ts

+3
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ export function createQuerySerializer<T = unknown>(options?: QuerySerializerOpti
368368
continue;
369369
}
370370
if (Array.isArray(value)) {
371+
if (value.length === 0) {
372+
continue;
373+
}
371374
search.push(
372375
serializeArrayParam(name, value, {
373376
style: 'form',

0 commit comments

Comments
 (0)