Skip to content

Commit

Permalink
fix: Do not reset stored user preferences on logout (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
satterly authored Nov 25, 2021
1 parent d757daf commit bced2e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/auth/ProfileMe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default {
},
methods: {
logout() {
this.$store.dispatch('resetUserPrefs')
this.$store.dispatch('clearUserPrefs')
this.$store
.dispatch('auth/logout')
.then(response => {
Expand Down
3 changes: 3 additions & 0 deletions src/store/modules/preferences.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ const actions = {
})
)
},
clearUserPrefs({commit}) {
commit('RESET_PREFS')
},
getUserQueries({dispatch, commit}) {
return UsersApi.getMeAttributes()
.then(({attributes}) => {
Expand Down

0 comments on commit bced2e2

Please sign in to comment.