mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Ensure object are compared unordered. [closes #1758]
This commit is contained in:
@@ -4575,7 +4575,6 @@
|
|||||||
*/
|
*/
|
||||||
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||||
var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
|
var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
|
||||||
isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
|
|
||||||
objProps = keys(object),
|
objProps = keys(object),
|
||||||
objLength = objProps.length,
|
objLength = objProps.length,
|
||||||
othProps = keys(other),
|
othProps = keys(other),
|
||||||
@@ -4587,8 +4586,7 @@
|
|||||||
var index = objLength;
|
var index = objLength;
|
||||||
while (index--) {
|
while (index--) {
|
||||||
var key = objProps[index];
|
var key = objProps[index];
|
||||||
if (!(isPartial ? key in other : baseHas(other, key)) ||
|
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||||
!(isUnordered || key == othProps[index])) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user