Skip to content

Commit 1868be8

Browse files
committed
Fix case in issue #16
1 parent bbda5e0 commit 1868be8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
result = result * -1;
420420
}
421421
}
422-
if (result === 0 && by[byIndex + 1]) {
422+
if (result === 0 && t.isDefined(by[byIndex + 1])) {
423423
result = compareFunc(xIn, yIn, byIndex + 1);
424424
}
425425
return result

dist/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ function getCompareFunc (options = {}) {
413413
result = result * -1;
414414
}
415415
}
416-
if (result === 0 && by[byIndex + 1]) {
416+
if (result === 0 && t.isDefined(by[byIndex + 1])) {
417417
result = compareFunc(xIn, yIn, byIndex + 1);
418418
}
419419
return result

index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function getCompareFunc (options = {}) {
8989
result = result * -1
9090
}
9191
}
92-
if (result === 0 && by[byIndex + 1]) {
92+
if (result === 0 && t.isDefined(by[byIndex + 1])) {
9393
result = compareFunc(xIn, yIn, byIndex + 1)
9494
}
9595
return result

0 commit comments

Comments
 (0)