Ensure object are compared unordered. [closes #1758]

This commit is contained in:
John-David Dalton
2016-01-13 03:56:55 -08:00
parent 846e813c99
commit 1ef4807a8e

View File

@@ -4575,7 +4575,6 @@
*/
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
@@ -4587,8 +4586,7 @@
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : baseHas(other, key)) ||
!(isUnordered || key == othProps[index])) {
if (!(isPartial ? key in other : baseHas(other, key))) {
return false;
}
}