mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Ensure _.isEqual performs comparisons between objects with shared property values correctly. [closes #415]
This commit is contained in:
27
dist/lodash.underscore.js
vendored
27
dist/lodash.underscore.js
vendored
@@ -690,22 +690,25 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
size++;
|
||||
return !(result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, stackA, stackB)) && indicatorObject;
|
||||
}
|
||||
});
|
||||
|
||||
if (result) {
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
return !(result = --size > -1) && indicatorObject;
|
||||
else {
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
size++;
|
||||
return !(result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, stackA, stackB)) && indicatorObject;
|
||||
}
|
||||
});
|
||||
|
||||
if (result) {
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
return !(result = --size > -1) && indicatorObject;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
stackA.pop();
|
||||
stackB.pop();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user