diff --git a/underscore.js b/underscore.js index 19f407acd..bac024592 100644 --- a/underscore.js +++ b/underscore.js @@ -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)) {