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 {