From 4dcf22de337a6918200e41a588d28ab4d32f188f Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:23:45 -0500 Subject: [PATCH] chore(internal): narrow type into stringifyQuery (#318) --- src/core.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.ts b/src/core.ts index 4d6ddb6e..3a25f548 100644 --- a/src/core.ts +++ b/src/core.ts @@ -443,8 +443,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); } return url.toString();