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