Skip to content

Commit

Permalink
fix: use system theme if no ncTheme available
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <[email protected]>
  • Loading branch information
grnd-alt committed Oct 10, 2024
1 parent de73f23 commit ef6aff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function App({
const ncThemes = document.body.dataset?.themes
return (
(window.matchMedia('(prefers-color-scheme: dark)').matches
&& ncThemes?.indexOf('light') === -1)
&& (ncThemes === undefined || ncThemes?.indexOf('light') === -1))
|| ncThemes?.indexOf('dark') > -1
)
}
Expand Down

0 comments on commit ef6aff9

Please sign in to comment.