fix: fixed token clear error
修复将token设置为undefined时可能失败的问题
This commit is contained in:
parent
f87b0f2f5e
commit
9640484895
|
|
@ -58,7 +58,7 @@ export const useUserStore = defineStore({
|
|||
},
|
||||
actions: {
|
||||
setToken(info: string | undefined) {
|
||||
this.token = info;
|
||||
this.token = info ? info : ''; // for null or undefined value
|
||||
setAuthCache(TOKEN_KEY, info);
|
||||
},
|
||||
setRoleList(roleList: RoleEnum[]) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue