From 525b5065563675d03d89cf090ce1f7fdf8ff0486 Mon Sep 17 00:00:00 2001 From: Chris Villa Date: Tue, 22 Oct 2024 16:23:16 +0100 Subject: [PATCH] fix: don't crash if component definition missing --- packages/core/lib/use-resolved-permissions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/lib/use-resolved-permissions.ts b/packages/core/lib/use-resolved-permissions.ts index 09c7f0f66..44cd736f7 100644 --- a/packages/core/lib/use-resolved-permissions.ts +++ b/packages/core/lib/use-resolved-permissions.ts @@ -158,7 +158,7 @@ export const useResolvedPermissions = < const initialPermissions = { ...globalPermissions, - ...componentConfig.permissions, + ...componentConfig?.permissions, }; const resolvedForItem = resolvedPermissions[item.props.id]; @@ -171,7 +171,7 @@ export const useResolvedPermissions = < return { ...globalPermissions, - ...componentConfig.permissions, + ...componentConfig?.permissions, }; } else if (root) { const rootConfig = config.root;