Fix stepjoin (#1067)

* sort fractions properly - fixes #1066
This commit is contained in:
Alex McLean 2024-04-23 22:37:21 +01:00 committed by GitHub
parent 6a1fa7e67f
commit a189626e8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 5 deletions

View file

@ -319,9 +319,11 @@ export function uniqsort(a) {
// rational version
export function uniqsortr(a) {
return a.sort().filter(function (item, pos, ary) {
return !pos || item.ne(ary[pos - 1]);
});
return a
.sort((x, y) => x.compare(y))
.filter(function (item, pos, ary) {
return !pos || item.ne(ary[pos - 1]);
});
}
// code hashing helpers