Skip to content

Commit 6ce6390

Browse files
committed
Merge pull request #23 from koyama-tagbangers
* pr/23: Polish 'Fix dark scheme detect function' Fix dark scheme detect function Closes gh-23
2 parents c3ea9d2 + caa0a60 commit 6ce6390

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/js/setup/switchtheme.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
}
4747

4848
function isInitialThemeDark() {
49-
return loadTheme() === "dark" || prefersDarkColorScheme.matches;
49+
const theme = loadTheme();
50+
return theme ? theme === "dark" : prefersDarkColorScheme.matches;
5051
}
5152

5253
function onThemeChange() {

0 commit comments

Comments
 (0)