added null check for empty policies
This commit is contained in:
parent
5cd7cb8115
commit
f4986cdd1e
1 changed files with 3 additions and 1 deletions
|
@ -181,7 +181,9 @@ export const ResourcesPolicySelect = ({
|
||||||
{field.value?.map((permissionId) => {
|
{field.value?.map((permissionId) => {
|
||||||
const item = items.find(
|
const item = items.find(
|
||||||
(permission) => permission.id === permissionId,
|
(permission) => permission.id === permissionId,
|
||||||
)!;
|
);
|
||||||
|
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
const route = to(item);
|
const route = to(item);
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue