Skip to content

Commit

Permalink
chore(internal): narrow type into stringifyQuery (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Jan 11, 2024
1 parent 406e502 commit 88fb9cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ export abstract class APIClient {
query = { ...defaultQuery, ...query } as Req;
}

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

return url.toString();
Expand Down

0 comments on commit 88fb9cd

Please sign in to comment.