Skip to content

Commit

Permalink
fix: prevent FOUC for theme (#1110)
Browse files Browse the repository at this point in the history
Closes #1109
  • Loading branch information
paoloricciuti authored Jan 16, 2025
1 parent 8422db4 commit e4cdbe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/site-kit/src/lib/components/ThemeToggle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
const theme = localStorage.getItem('sv:theme');
document.documentElement.classList.add(
theme === 'system'
!theme || theme === 'system'
? window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light'
Expand Down

0 comments on commit e4cdbe6

Please sign in to comment.