Skip to content

Commit 6227f89

Browse files
amarant-commerceIvan Rogar
authored andcommitted
FIXED array query params
1 parent c36b5a7 commit 6227f89

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/templates/core/functions/getQueryString.hbs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ export const getQueryString = (params: Record<string, any>): string => {
99
if (isDefined(value)) {
1010
if (Array.isArray(value)) {
1111
// preserve indexes for array type query params
12-
let newValue = {};
1312
value.forEach((v, i) => {
14-
newValue[i] = v;
13+
process(`${key}[${i}]`, v);
1514
});
16-
17-
process(key, newValue);
1815
} else if (typeof value === 'object') {
1916
Object.entries(value).forEach(([k, v]) => {
2017
process(`${key}[${k}]`, v);

0 commit comments

Comments
 (0)