Skip to content

Commit

Permalink
fix: dark mode toggle
Browse files Browse the repository at this point in the history
if isDark is set to false, it will jump this judgement and use the system prefers
if isDark is not set to wsCache it will return null by default
  • Loading branch information
floyd-li committed Jan 10, 2023
1 parent 9b8f323 commit bbc7646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { wsCache } = useCache()
// 根据浏览器当前主题设置系统主题色
const setDefaultTheme = () => {
if (wsCache.get('isDark')) {
if (wsCache.get('isDark') !== null) {
appStore.setIsDark(wsCache.get('isDark'))
return
}
Expand Down

0 comments on commit bbc7646

Please sign in to comment.