Skip to content

Commit

Permalink
Fix missing unref
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat authored and JammingBen committed Jan 16, 2024
1 parent 1d4791e commit ffc01bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web-pkg/src/composables/piniaStores/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ export const useThemeStore = defineStore('theme', () => {

setAndApplyTheme(
unref(availableThemes).find((t) => t.name === unref(currentLocalStorageThemeName)) ||
(isDark ? availableThemes.value[1] : availableThemes.value[0]),
(unref(isDark) ? availableThemes.value[1] : availableThemes.value[0]),
false
)
}

const setAutoSystemTheme = () => {
currentLocalStorageThemeName.value = null
setAndApplyTheme(isDark ? availableThemes.value[1] : availableThemes.value[0], false)
setAndApplyTheme(unref(isDark) ? availableThemes.value[1] : availableThemes.value[0], false)
}

const isCurrentThemeAutoSystem = computed(() => {
Expand Down

0 comments on commit ffc01bb

Please sign in to comment.