Skip to content

Commit

Permalink
Merge pull request #186 from Geoportail-Luxembourg/fix_reset_theme
Browse files Browse the repository at this point in the history
Stay in the theme when disconnected even if the theme does not exist …
  • Loading branch information
rmichaelis authored Jan 30, 2025
2 parents 8c39a25 + 60a876f commit 3bfa7cb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/stores/config.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,12 @@ export const useThemeStore = defineStore(

function setThemes(themes: ConfigModel) {
config.value = themes

// Force reset current theme, eg. if theme was restricted,
// may not exists anymore when user disconnect
if (theme.value === undefined) {
resetCurrentTheme()
}
}

function setTheme(name: string) {
themeName.value = name
}

function resetCurrentTheme() {
themeName.value = DEFAULT_CURRENT_THEME
}

return {
config,
themes,
Expand Down

0 comments on commit 3bfa7cb

Please sign in to comment.