From 2d7d057b052c55e9eaf48f38798075a138c1bac1 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 29 Jun 2023 02:40:48 -0400 Subject: [PATCH] fix: need typeof --- src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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