From 62058eae5bf28294d13aad862dab63941ababf0d Mon Sep 17 00:00:00 2001 From: ramon Date: Fri, 19 May 2023 11:38:10 +1000 Subject: [PATCH] We want to have at least 2 revisions before showing the revisions link. Removing the `+ 1` ensures this. --- .../components/sidebar-edit-mode/template-revisions/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-edit-mode/template-revisions/index.js b/packages/edit-site/src/components/sidebar-edit-mode/template-revisions/index.js index 3782dccfb7e287..e2e6f48a7a966b 100644 --- a/packages/edit-site/src/components/sidebar-edit-mode/template-revisions/index.js +++ b/packages/edit-site/src/components/sidebar-edit-mode/template-revisions/index.js @@ -19,8 +19,7 @@ const useRevisionData = () => { currentTemplate?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null; const revisionsCount = - ( currentTemplate?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0 ) + - 1; + currentTemplate?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0; return { currentTemplate,