From 74e2e7e924089a83fae22e302627b31a7e63eeb2 Mon Sep 17 00:00:00 2001 From: Michael Rowley Date: Thu, 30 Dec 2021 02:01:20 +0000 Subject: [PATCH] Fixed IPv6 sorting --- src/core/operations/Sort.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/operations/Sort.mjs b/src/core/operations/Sort.mjs index da7ded80..80e09b95 100644 --- a/src/core/operations/Sort.mjs +++ b/src/core/operations/Sort.mjs @@ -117,7 +117,7 @@ class Sort extends Operation { static _ipv6Sort(a, b) { const ipLib = require("../lib/IP.mjs"); const numericalA = ipLib.strToIpv6(a, false), numericalB = ipLib.strToIpv6(b, false); - return numericalA < numericalB ? -1 : 1; + return numericalA - numericalB; } /**