From b2560e9b25b8d208bd675507befafbb512901067 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 20 Jul 2022 17:22:10 -0400 Subject: [PATCH] *Add more safety checks on window --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 446ad5b..e619064 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,7 +14,7 @@ const RPC_MODULE = "AQDaEPIo_lpdvz7AKbeafERBHR331RiyvweJ6OrFTplzyg"; let callModule: typeof callModuleModule, connectModule: typeof connectModuleModule; -if (window.document) { +if (typeof window !== "undefined" && window?.document) { callModule = callModuleKernel; connectModule = connectModuleKernel; } else {