We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
document
1 parent 56b2114 commit fbf73d6Copy full SHA for fbf73d6
packages/anu-vue/src/composables/useAnu.ts
@@ -45,7 +45,7 @@ export const useAnu = createGlobalState((options?: AnuComposableOptions) => {
45
watch(activeThemeName, (newThemeName, oldThemeName) => {
46
const newTheme = themes.value[newThemeName]
47
48
- if (newTheme && newTheme.class)
+ if (newTheme && newTheme.class && typeof document !== 'undefined')
49
document.documentElement.classList.toggle(newTheme.class)
50
51
// ℹ️ Initially, `oldThemeName` will be undefined
0 commit comments