diff --git a/webui/src/lib/components/repository/changes.jsx b/webui/src/lib/components/repository/changes.jsx index de6e7b7f1bc..0c09286a4cf 100644 --- a/webui/src/lib/components/repository/changes.jsx +++ b/webui/src/lib/components/repository/changes.jsx @@ -149,7 +149,11 @@ export const TreeEntryRow = ({entry, relativeTo = "", leaf = false, dirExpanded, if (!leaf) { rowActions.push(new RowAction(, showSummary ? "Hide summary" : "Calculate change summary", showSummary, () => setShowSummary(!showSummary))) } - rowActions.push(new RowAction(, "Revert changes", false, () => {setShowRevertConfirm(true)})) + if (onRevert) { + rowActions.push(new RowAction(, "Revert changes", false, () => { + setShowRevertConfirm(true) + })) + } return ( {diffIndicator}