We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ee658f commit 9c21797Copy full SHA for 9c21797
src/store/modules/user.ts
@@ -62,7 +62,7 @@ export const useUserStore = defineStore('admin-user', {
62
userInfo = await getInfo()
63
} catch (error) {}
64
}
65
- this.permissions = new Set(userInfo.permissions)
+ this.permissions = new Set(userInfo.permissions || []) // 兜底为 [] https://t.zsxq.com/xCJew
66
this.roles = userInfo.roles
67
this.user = userInfo.user
68
this.isSetUser = true
0 commit comments