Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 88fb9cd

Browse files
authoredJan 11, 2024
chore(internal): narrow type into stringifyQuery (#619)
1 parent 406e502 commit 88fb9cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/core.ts

+2-2
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)
Please sign in to comment.