From a247d1fb055068bd38ce54dc4ef6823972eda2d0 Mon Sep 17 00:00:00 2001 From: Justin Dalrymple Date: Wed, 11 Oct 2023 16:49:15 -0400 Subject: [PATCH] Using a clearer check --- packages/rest/src/Requester.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rest/src/Requester.ts b/packages/rest/src/Requester.ts index 17d952d47..369473c2d 100644 --- a/packages/rest/src/Requester.ts +++ b/packages/rest/src/Requester.ts @@ -16,7 +16,7 @@ export async function defaultOptionsHandler( resourceOptions.rejectUnauthorized != null && resourceOptions.rejectUnauthorized === false ) { - if (typeof window !== 'object') { + if (typeof window === 'undefined') { const { Agent } = await import('https'); options.agent = new Agent({