Skip to content

Commit

Permalink
fix: 修复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft authored and jianbing.chen committed Dec 18, 2024
1 parent 753563d commit da4d5e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/pages/admin/user/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function MenuList() {

const getRoles = async () => {
const roleList = await getRoleListAll(parseInt(projectId));
setRoleList(roleList);
setRoleList(roleList || []);
};

// 分页事件
Expand Down Expand Up @@ -106,7 +106,7 @@ export default function MenuList() {
title: '角色列表',
dataIndex: 'roleId',
render(roleId) {
return roleList.find((item) => item.id === roleId)?.name;
return roleList?.find((item) => item.id === roleId)?.name;
},
},
{
Expand Down

0 comments on commit da4d5e9

Please sign in to comment.