diff --git a/theme/src/client/composables/css-var.ts b/theme/src/client/composables/css-var.ts index e24dfac8..2d409999 100644 --- a/theme/src/client/composables/css-var.ts +++ b/theme/src/client/composables/css-var.ts @@ -14,7 +14,7 @@ export function useCssVar( const variable = shallowRef(initialValue) function updateCssVar() { - const _window = typeof window ? window : null + const _window = typeof window !== 'undefined' ? window : null const target = _window?.document?.documentElement const key = toValue(prop) if (target && key) {