From ed3c05e74c4e332929b00e1613fcdd88988721a3 Mon Sep 17 00:00:00 2001 From: Kit Cambridge Date: Tue, 25 Oct 2011 23:20:31 -0600 Subject: [PATCH] `_.isEqual`: Fix an erroneous check for the `constructor` property. --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {