Ensure _.sortBy is stable for undefined values.

Former-commit-id: bf250150d27de050ea7a6fa376aacdc8d1ba7716
This commit is contained in:
John-David Dalton
2012-09-06 22:35:20 -07:00
parent fa9df75cf7
commit 9a7d9e7bb8
2 changed files with 7 additions and 1 deletions

View File

@@ -757,6 +757,9 @@
a = a.criteria;
b = b.criteria;
if (a === b) {
return ai < bi ? -1 : 1;
}
if (a === undefined) {
return 1;
}