From 7ef3f341fe8f088120aec5e76283f268b1b5c7ca Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 16 Jul 2024 15:16:41 -0300 Subject: [PATCH] fixup! fixup! fix: sort affected versions ASC --- lib/security_blog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/security_blog.js b/lib/security_blog.js index 773cd23f..c0987bfe 100644 --- a/lib/security_blog.js +++ b/lib/security_blog.js @@ -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;