diff --git a/packages/demo/offckb.config.ts b/packages/demo/offckb.config.ts index 423f8b2..b92f2c2 100644 --- a/packages/demo/offckb.config.ts +++ b/packages/demo/offckb.config.ts @@ -84,8 +84,8 @@ export function readEnvNetwork(): Network { // according to your frontend framework const defaultNetwork = "devnet"; let network = defaultNetwork; - if (typeof window != null) { - //@ts-ignore + if (typeof window !== "undefined") { + //@ts-expect-error "env" network = window.ENV.NETWORK; } if (!network) return defaultNetwork;