Commit aebad61b3d3e11aaf720b37e762e53e2e6999d3c
1 parent
b1cb8635
fix: ensure that roleList is not empty
Showing
1 changed file
with
1 additions
and
1 deletions
src/store/modules/permission.ts
... | ... | @@ -91,7 +91,7 @@ export const usePermissionStore = defineStore({ |
91 | 91 | const appStore = useAppStoreWidthOut(); |
92 | 92 | |
93 | 93 | let routes: AppRouteRecordRaw[] = []; |
94 | - const roleList = toRaw(userStore.getRoleList); | |
94 | + const roleList = toRaw(userStore.getRoleList) || []; | |
95 | 95 | const { permissionMode = projectSetting.permissionMode } = appStore.getProjectConfig; |
96 | 96 | // role permissions |
97 | 97 | if (permissionMode === PermissionModeEnum.ROLE) { | ... | ... |