From bd377148ade7aaf26652dc14ee77683b7e6c8c5a Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 20 Jun 2019 11:47:33 -0400
Subject: [PATCH] delete state.token instead of setting false
---
src/modules/oauth.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/modules/oauth.js b/src/modules/oauth.js
index b7755b64..a2a83450 100644
--- a/src/modules/oauth.js
+++ b/src/modules/oauth.js
@@ -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: {