diff --git a/src/client/app/data.ts b/src/client/app/data.ts index 146d8742..c99de52f 100644 --- a/src/client/app/data.ts +++ b/src/client/app/data.ts @@ -80,14 +80,14 @@ export function initData(route: Route): VitePressData { appearance === 'force-dark' ? ref(true) : appearance === 'force-auto' - ? usePreferredDark() - : appearance - ? useDark({ - storageKey: APPEARANCE_KEY, - initialValue: () => (appearance === 'dark' ? 'dark' : 'auto'), - ...(typeof appearance === 'object' ? appearance : {}) - }) - : ref(false) + ? usePreferredDark() + : appearance + ? useDark({ + storageKey: APPEARANCE_KEY, + initialValue: () => (appearance === 'dark' ? 'dark' : 'auto'), + ...(typeof appearance === 'object' ? appearance : {}) + }) + : ref(false) const hashRef = ref(inBrowser ? location.hash : '')