delete state.token instead of setting false

This commit is contained in:
taehoon 2019-06-20 11:47:33 -04:00
parent 8a32731e4d
commit bd377148ad

View file

@ -1,3 +1,5 @@
import { delete as del } from 'vue'
const oauth = {
state: {
clientId: false,
@ -25,7 +27,9 @@ const oauth = {
},
clearToken (state) {
state.userToken = false
state.token = false
// state.token is userToken with older name, coming from persistent state
// let's clear it as well, since it is being used as a fallback of state.userToken
del(state, 'token')
}
},
getters: {