mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17: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) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user