Move the dom/function check up in baseIsEqual.

This commit is contained in:
John-David Dalton
2014-04-26 07:07:34 -07:00
parent aea4d73e61
commit f1b2d4340d

View File

@@ -1643,6 +1643,10 @@
}
var isArr = valClass == arrayClass;
if (!isArr) {
// exit for functions and DOM nodes
if (valClass != objectClass || (!support.nodeClass && (isNode(value) || isNode(other)))) {
return false;
}
// unwrap any `lodash` wrapped values
var valWrapped = hasOwnProperty.call(value, '__wrapped__'),
othWrapped = hasOwnProperty.call(other, '__wrapped__');
@@ -1650,10 +1654,6 @@
if (valWrapped || othWrapped) {
return baseIsEqual(valWrapped ? value.__wrapped__ : value, othWrapped ? other.__wrapped__ : other, callback, isWhere, stackA, stackB);
}
// exit for functions and DOM nodes
if (valClass != objectClass || (!support.nodeClass && (isNode(value) || isNode(other)))) {
return false;
}
if (!support.argsObject) {
valIsArg = isArguments(value);
othIsArg = isArguments(other);