diff --git a/packages/core/client/src/acl/ACLProvider.tsx b/packages/core/client/src/acl/ACLProvider.tsx index a1699e6908..9349de3de7 100644 --- a/packages/core/client/src/acl/ACLProvider.tsx +++ b/packages/core/client/src/acl/ACLProvider.tsx @@ -94,7 +94,7 @@ export const ACLActionParamsContext = createContext({}); export const useACLRolesCheck = () => { const ctx = useContext(ACLContext); const ns = useCollectionNamespace(); - const { dataSources: dataSourcesAcl } = ctx.data.meta; + const { dataSources: dataSourcesAcl } = ctx?.data?.meta || {}; const data = { ...ctx?.data?.data, ...omit(dataSourcesAcl?.[ns], 'snippets') }; const getActionAlias = (actionPath: string) => { const actionName = actionPath.split(':').pop();