mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Simplify ctor check flag in equalObjects.
This commit is contained in:
@@ -3886,7 +3886,7 @@
|
|||||||
if (objLength != othLength && !isLoose) {
|
if (objLength != othLength && !isLoose) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var hasCtor,
|
var skipCtor = isLoose,
|
||||||
index = -1;
|
index = -1;
|
||||||
|
|
||||||
while (++index < objLength) {
|
while (++index < objLength) {
|
||||||
@@ -3911,9 +3911,9 @@
|
|||||||
if (!result) {
|
if (!result) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
hasCtor || (hasCtor = key == 'constructor');
|
skipCtor || (skipCtor = key == 'constructor');
|
||||||
}
|
}
|
||||||
if (!hasCtor && !isLoose) {
|
if (!skipCtor) {
|
||||||
var objCtor = object.constructor,
|
var objCtor = object.constructor,
|
||||||
othCtor = other.constructor;
|
othCtor = other.constructor;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user