Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: color mode in server (#159)
  • Loading branch information
Victor committed Sep 9, 2022
1 parent 536445b commit fcf0aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/plugin.server.ts
Expand Up @@ -51,7 +51,7 @@ export default defineNuxtPlugin((nuxtApp) => {

useRouter().afterEach((to) => {
const forcedColorMode = isVue2
? (to.matched[0]?.components.default as any)?.options.colorMode
? (to.matched[0]?.components.default as any)?.options?.colorMode
: to.meta.colorMode

if (forcedColorMode && forcedColorMode !== 'system') {
Expand Down

0 comments on commit fcf0aea

Please sign in to comment.