提交 aebad61b 作者: vben

fix: ensure that roleList is not empty

上级 b1cb8635
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论