Fix subsort error

This commit is contained in:
An Phan 2016-03-20 21:56:10 +08:00
parent 36b6d9e17a
commit 1c15a56c68

View file

@ -298,7 +298,7 @@
if (a === b) {
if (_.isNumber(aSub) && _.isNumber(bSub)) {
return aSub === bSub ? 0 : aSub > bSub ? order : -order;
} else if (aSub !== undefined && bSub !== undefined) {
} else if (aSub && bSub) {
aSub = aSub.toLowerCase();
bSub = bSub.toLowerCase();
@ -317,7 +317,7 @@
if (a === b) {
if (_.isNumber(aSub) && _.isNumber(bSub)) {
return aSub === bSub ? 0 : aSub > bSub ? order : -order;
} else if (aSub !== undefined && bSub !== undefined) {
} else if (aSub && bSub) {
aSub = aSub.toLowerCase();
bSub = bSub.toLowerCase();