提交 96404848 编写于 作者: 无木

fix: fixed token clear error

修复将token设置为undefined时可能失败的问题
上级 f87b0f2f
......@@ -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[]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册