make sure to clear old token when logout

This commit is contained in:
taehoon 2019-06-19 23:11:39 -04:00
parent 03a27c6d48
commit 268e9ce504
3 changed files with 7 additions and 2 deletions

View file

@ -399,7 +399,7 @@ const users = {
logout (store) {
store.commit('clearCurrentUser')
store.dispatch('disconnectFromChat')
store.commit('setToken', false)
store.commit('clearToken')
store.dispatch('stopFetching', 'friends')
store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))
store.dispatch('stopFetching', 'notifications')