diff --git a/build.js b/build.js index a65315a9c..913ba8a70 100644 --- a/build.js +++ b/build.js @@ -266,7 +266,7 @@ 'escapeHtmlChar': ['htmlEscapes'], 'htmlUnescapes': ['htmlEscapes'], 'isArray': ['reNative'], - 'isEqual': ['indicatorObject'], + 'isEqual': ['indicatorObject', 'objectTypes'], 'isObject': ['objectTypes'], 'isPlainObject': ['reNative'], 'isRegExp': ['objectTypes'], @@ -3320,8 +3320,8 @@ ' otherType = typeof b;', '', ' if (a === a &&', - " (!a || (type != 'function' && type != 'object')) &&", - " (!b || (otherType != 'function' && otherType != 'object'))) {", + " !(a && objectTypes[type]) &&", + " !(b && objectTypes[otherType])) {", ' return false;', ' }', ' if (a == null || b == null) {', diff --git a/lodash.js b/lodash.js index 71677b2da..7bb007547 100644 --- a/lodash.js +++ b/lodash.js @@ -1934,8 +1934,8 @@ // exit early for unlike primitive values if (a === a && - (!a || (type != 'function' && type != 'object')) && - (!b || (otherType != 'function' && otherType != 'object'))) { + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { return false; } // exit early for `null` and `undefined`, avoiding ES3's Function#call behavior