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({