Skip to content

Commit

Permalink
chore(internal): narrow type into stringifyQuery (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Jan 11, 2024
1 parent e38f32f commit 3f42e07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.ts
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 3f42e07

Please sign in to comment.