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. (#50762)
  • Loading branch information
ramonjd authored May 21, 2023
1 parent d42095c commit 2e40379
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

1 comment on commit 2e40379

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 2e40379.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5039933662
📝 Reported issues:

Please sign in to comment.