diff --git a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusBarActions.tsx b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusBarActions.tsx index 550ee92d5ab..ebd5912d4ca 100644 --- a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusBarActions.tsx +++ b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusBarActions.tsx @@ -122,7 +122,9 @@ export const HistoryStatusBarActions = memo(function HistoryStatusBarActions() { const revision = revTime?.id || '' const disabled = (editState?.draft || editState?.published || {})._rev === revision const actionProps = useMemo(() => ({...(editState || {}), revision}), [editState, revision]) - const historyActions = useMemo(() => (actions ?? []).filter(isRestoreAction), [actions]) + + // If multiple `restore` actions are defined, ensure only the final one is used. + const historyActions = useMemo(() => (actions ?? []).filter(isRestoreAction).slice(-1), [actions]) return (