fix: dark mode toggle

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
This commit is contained in:
Floyd Li 2023-01-10 14:34:45 +08:00 committed by GitHub
parent 9b8f3234db
commit bbc764601e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ const { wsCache } = useCache()
//
const setDefaultTheme = () => {
if (wsCache.get('isDark')) {
if (wsCache.get('isDark') !== null) {
appStore.setIsDark(wsCache.get('isDark'))
return
}