diff --git a/apps/admin-x-settings/src/components/settings/advanced/HistoryModal.tsx b/apps/admin-x-settings/src/components/settings/advanced/HistoryModal.tsx
index 6a55749ab8..d2423843a7 100644
--- a/apps/admin-x-settings/src/components/settings/advanced/HistoryModal.tsx
+++ b/apps/admin-x-settings/src/components/settings/advanced/HistoryModal.tsx
@@ -127,7 +127,7 @@ const HistoryActionDescription: React.FC<{action: Action}> = ({action}) => {
{group.slice(0, 1).toUpperCase()}{group.slice(1)}
{group !== key && ({key})
}
>;
- } else if (action.resource?.title || action.resource?.name || action.context.primary_name) {
+ } else if (action.resource?.title || action.resource?.name || action.context?.primary_name) {
const linkTarget = getLinkTarget(action);
if (linkTarget) {
@@ -136,7 +136,7 @@ const HistoryActionDescription: React.FC<{action: Action}> = ({action}) => {
updateRoute(linkTarget);
}}>{action.resource?.title || action.resource?.name};
} else {
- return <>{action.resource?.title || action.resource?.name || action.context.primary_name}>;
+ return <>{action.resource?.title || action.resource?.name || action.context?.primary_name}>;
}
} else {
return (unknown);