-
Notifications
You must be signed in to change notification settings - Fork 9
Filter and sort releases list, then show the latest ones for 7.x and 8.x #47
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
Conversation
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.
Changes above were added automatically by the IDE, but I thought it was OK. Removing extra spaces.
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.
Iterating arrays is cheap, so we just iterate twice, filtering by the release name, sorting by date asc, and getting the last item with .pop()
, which may return undefined.
If not undefined, then we use the old code to populate the HTML elements in the UI.
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.
Great, thanks @kinow 👍
Tested locally.
image