Simplify ctor check flag in equalObjects.

This commit is contained in:
jdalton
2015-03-23 09:24:55 -07:00
parent 600a4e86e1
commit f914f080b1

View File

@@ -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;