fix: ensure that roleList is not empty
This commit is contained in:
parent
b1cb863502
commit
aebad61b3d
|
|
@ -91,7 +91,7 @@ export const usePermissionStore = defineStore({
|
|||
const appStore = useAppStoreWidthOut();
|
||||
|
||||
let routes: AppRouteRecordRaw[] = [];
|
||||
const roleList = toRaw(userStore.getRoleList);
|
||||
const roleList = toRaw(userStore.getRoleList) || [];
|
||||
const { permissionMode = projectSetting.permissionMode } = appStore.getProjectConfig;
|
||||
// role permissions
|
||||
if (permissionMode === PermissionModeEnum.ROLE) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue