Skip to content

Commit aa6acb1

Browse files
committed
fix: #227 Fixing array syntax thanks to Lukas Eipert (https://github.com/leipert)
1 parent cea5a2b commit aa6acb1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/infrastructure/KyRequester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function defaultRequest(
3131
{
3232
timeout: 30000,
3333
headers,
34-
searchParams: stringify(decamelizeKeys(query || {}), { arrayFormat: 'bracket' }),
34+
searchParams: stringify(decamelizeKeys(query), { arrayFormat: 'bracket' }),
3535
prefixUrl: service.url,
3636
json: typeof body === 'object' ? decamelizeKeys(body, skipAllCaps) : body,
3737
rejectUnauthorized: service.rejectUnauthorized,

src/infrastructure/RequestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function get(
99
): Promise<GetResponse> {
1010
const { showPagination, maxPages, sudo, ...query } = options;
1111
const response = await service.requester.get(service, endpoint, {
12-
query,
12+
query: query || {},
1313
sudo,
1414
});
1515
const { headers } = response;

0 commit comments

Comments
 (0)