diff --git a/src/helpers/querystring-helper.js b/src/helpers/querystring-helper.js index 11dcdb48..b6f8ec3b 100644 --- a/src/helpers/querystring-helper.js +++ b/src/helpers/querystring-helper.js @@ -52,14 +52,14 @@ export function buildURLSearchParams(data) { } if (Array.isArray(value)) { value.forEach((arrayValue, index) => { - if (typeof value === 'object') { + if (typeof arrayValue === 'object') { Object.entries(arrayValue).forEach(([objectKey, objectValue]) => { if (objectValue != null) { params.append(`${key}[${index}].${objectKey}`, `${objectValue}`); } }); } else { - params.append(`${key}[${index}]`, `${value}`); + params.append(`${key}[${index}]`, `${arrayValue}`); } }); } else {