Skip to content

Commit

Permalink
We want to have at least 2 revisions before showing the revisions lin…
Browse files Browse the repository at this point in the history
…k. Removing the `+ 1` ensures this.
  • Loading branch information
ramonjd committed May 19, 2023
1 parent aa8bc55 commit 62058ea
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 62058ea

Please sign in to comment.