-
-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix history view dropdown for first entry, showing 'Revert to this version option' always #4471
Conversation
…rsion option' always
✅ Deploy Preview for volto canceled.
|
Passing run #4282 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
render() { | ||
processHistoryEntries = () => { | ||
// Getting the history entries from the props | ||
// No clue why the reverse(concat()) is necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess someone just didn't want to figure out how to write a for loop to go through the entries in reverse order?
|
||
return item; | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use lodash.find to add is_current: true
to the first item that has type: 'versioning'
instead of adding show_revert_true
to all the others. And then check for is_current
below.
But, this is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davisagli refactored using find
, I thought it would return all the matching elements. Thanks for the suggestion!
…rsion option' always (#4471)
…rsion option' always (#4471)
* master: (23 commits) Fix training urls (Remove /5/) (#4502) Release 17.0.0-alpha.1 Changelog Serve static assets with an efficient cache policy (#2216) Release 16.15.0. Update Changelog. (#4485) Improvements to dev proxy (#4434) fix: newsitem view blocks wrapper className (#4443) Fix history view dropdown for first entry, showing 'Revert to this version option' always (#4471) Teaser block docs (#4461) Fix order of row of long table in edit and view mode. (#4472) Improve flaky test in autofocus Cypress tests (#4475) Use popperjs in BlockChooser, move the markup to the bottom of the bo… (#4141) Change from links to inline literals in `CHANGELOG.md` to fix linkche… (#4470) Release generate-volto 7.0.0-alpha.2 Improve stylelint config in generator, include scss support (#4469) Fix weird GHA failure on config option not supported (#4466) Release generate-volto 7.0.0-alpha.1 Fix ESlint failure for the generator (#4465) Change towncrier job name (#4462) Release 17.0.0-alpha.0 ...
No description provided.