_.isEqual: Fix an erroneous check for the constructor property.

This commit is contained in:
Kit Cambridge
2011-10-25 23:20:31 -06:00
parent a0b3feca85
commit ed3c05e74c

View File

@@ -726,7 +726,7 @@
}
} else {
// Objects with different constructors are not equivalent.
if ("constructor" in a == "constructor" in b && a.constructor != b.constructor) return false;
if ("constructor" in a != "constructor" in b || a.constructor != b.constructor) return false;
// Deep compare objects.
for (var key in a) {
if (hasOwnProperty.call(a, key)) {