added null check for empty policies

This commit is contained in:
Erik Jan de Wit 2023-08-21 15:32:59 +02:00 committed by Pedro Igor
parent 5cd7cb8115
commit f4986cdd1e

View file

@ -181,7 +181,9 @@ export const ResourcesPolicySelect = ({
{field.value?.map((permissionId) => {
const item = items.find(
(permission) => permission.id === permissionId,
)!;
);
if (!item) return;
const route = to(item);
return (