Skip to content

Commit

Permalink
fixup! fixup! fix: sort affected versions ASC
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Jul 16, 2024
1 parent a93b8b0 commit 7ef3f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/security_blog.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export default class SecurityBlog {
affectedVersions.add(affectedVersion);
}
}
const parseToNumber = str => str.match(/[\d.]+/g)[0];
const parseToNumber = str => +(str.match(/[\d.]+/g)[0]);
return Array.from(affectedVersions)
.sort((a, b) => {
return parseToNumber(a) > parseToNumber(b) ? -1 : 1;
Expand Down

0 comments on commit 7ef3f34

Please sign in to comment.