Skip to content

Commit

Permalink
Merge pull request #23 from koyama-tagbangers
Browse files Browse the repository at this point in the history
* pr/23:
  Polish 'Fix dark scheme detect function'
  Fix dark scheme detect function

Closes gh-23
  • Loading branch information
philwebb committed Jun 10, 2021
2 parents c3ea9d2 + caa0a60 commit 6ce6390
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/js/setup/switchtheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
}

function isInitialThemeDark() {
return loadTheme() === "dark" || prefersDarkColorScheme.matches;
const theme = loadTheme();
return theme ? theme === "dark" : prefersDarkColorScheme.matches;
}

function onThemeChange() {
Expand Down

0 comments on commit 6ce6390

Please sign in to comment.