diff --git a/packages/shared/utils/is.ts b/packages/shared/utils/is.ts index e9f363a5369..16dde83a626 100644 --- a/packages/shared/utils/is.ts +++ b/packages/shared/utils/is.ts @@ -1,5 +1,5 @@ /* eslint-disable antfu/top-level-function */ -export const isClient = typeof window !== 'undefined' +export const isClient = typeof window !== 'undefined' && typeof document !== 'undefined' export const isDef = (val?: T): val is T => typeof val !== 'undefined' export const notNullish = (val?: T | null | undefined): val is T => val != null export const assert = (condition: boolean, ...infos: any[]) => {