Skip to content

Commit

Permalink
fix: don't crash if component definition missing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Oct 22, 2024
1 parent bf5c5a3 commit 525b506
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/lib/use-resolved-permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const useResolvedPermissions = <

const initialPermissions = {
...globalPermissions,
...componentConfig.permissions,
...componentConfig?.permissions,
};

const resolvedForItem = resolvedPermissions[item.props.id];
Expand All @@ -171,7 +171,7 @@ export const useResolvedPermissions = <

return {
...globalPermissions,
...componentConfig.permissions,
...componentConfig?.permissions,
};
} else if (root) {
const rootConfig = config.root;
Expand Down

0 comments on commit 525b506

Please sign in to comment.