Skip to content

Commit 2a3a126

Browse files
committed
chore(internal): narrow type into stringifyQuery (#253)
1 parent 76b1429 commit 2a3a126

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ export abstract class APIClient {
452452
query = { ...defaultQuery, ...query } as Req;
453453
}
454454

455-
if (query) {
456-
url.search = this.stringifyQuery(query);
455+
if (typeof query === 'object' && query && !Array.isArray(query)) {
456+
url.search = this.stringifyQuery(query as Record<string, unknown>);
457457
}
458458

459459
return url.toString();

0 commit comments

Comments
 (0)