mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Simplify isLoose check in baseIsEqualDeep.
This commit is contained in:
@@ -2349,20 +2349,16 @@
|
|||||||
if (isSameTag && !(objIsArr || objIsObj)) {
|
if (isSameTag && !(objIsArr || objIsObj)) {
|
||||||
return equalByTag(object, other, objTag);
|
return equalByTag(object, other, objTag);
|
||||||
}
|
}
|
||||||
if (isLoose) {
|
if (!isLoose) {
|
||||||
if (!isSameTag && !(objIsObj && othIsObj)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
||||||
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
||||||
|
|
||||||
if (valWrapped || othWrapped) {
|
if (valWrapped || othWrapped) {
|
||||||
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
|
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
|
||||||
}
|
}
|
||||||
if (!isSameTag) {
|
}
|
||||||
return false;
|
if (!isSameTag) {
|
||||||
}
|
return false;
|
||||||
}
|
}
|
||||||
// Assume cyclic values are equal.
|
// Assume cyclic values are equal.
|
||||||
// For more information on detecting circular references see https://es5.github.io/#JO.
|
// For more information on detecting circular references see https://es5.github.io/#JO.
|
||||||
|
|||||||
Reference in New Issue
Block a user