We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6169577 commit f70f067Copy full SHA for f70f067
src/store/modules/user.js
@@ -68,9 +68,9 @@ const actions = {
68
logout({ commit, state }) {
69
return new Promise((resolve, reject) => {
70
logout(state.token).then(() => {
71
- commit('RESET_STATE', '')
72
- removeToken()
+ removeToken() // must remove token first
73
resetRouter()
+ commit('RESET_STATE')
74
resolve()
75
}).catch(error => {
76
reject(error)
@@ -81,8 +81,8 @@ const actions = {
81
// remove token
82
resetToken({ commit }) {
83
return new Promise(resolve => {
84
- commit('SET_TOKEN', '')
85
86
87
})
88
}
0 commit comments