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 02b561c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/web-pkg/src/apps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface ClassicApplicationScript {
translations?: ApplicationTranslations
extensions?: Ref<Extension[]>
initialize?: () => void
ready?: (args: AppReadyHookArgs) => void
ready?: (args: AppReadyHookArgs) => Promise<void> | void
mounted?: (...args) => void
// TODO: move this to its own type
setup?: (args: { applicationConfig: AppConfigObject }) => ClassicApplicationScript
Expand Down
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 02b561c

Please sign in to comment.