mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
fix(theme): incorrect ssr in dark-mode
This commit is contained in:
parent
b97b7f2e5f
commit
bbef6a8f18
@ -10,6 +10,8 @@ export const darkModeSymbol: InjectionKey<DarkModeRef> = Symbol(
|
||||
)
|
||||
|
||||
export function enableTransitions() {
|
||||
if (typeof document === 'undefined')
|
||||
return false
|
||||
return 'startViewTransition' in document
|
||||
&& window.matchMedia('(prefers-reduced-motion: no-preference)').matches
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user