diff --git a/src/api.ts b/src/api.ts index 5b080bf..ce4128e 100644 --- a/src/api.ts +++ b/src/api.ts @@ -12,7 +12,7 @@ import { } from "#module/index.js"; // @ts-ignore -const kernelEnv = window !== "undefined" && window?.document; +const kernelEnv = typeof window !== "undefined" && window?.document; export const callModule = kernelEnv ? callModuleKernel : callModuleModule; export const connectModule = kernelEnv