mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Move the dom/function check up in baseIsEqual.
This commit is contained in:
@@ -1643,6 +1643,10 @@
|
|||||||
}
|
}
|
||||||
var isArr = valClass == arrayClass;
|
var isArr = valClass == arrayClass;
|
||||||
if (!isArr) {
|
if (!isArr) {
|
||||||
|
// exit for functions and DOM nodes
|
||||||
|
if (valClass != objectClass || (!support.nodeClass && (isNode(value) || isNode(other)))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// unwrap any `lodash` wrapped values
|
// unwrap any `lodash` wrapped values
|
||||||
var valWrapped = hasOwnProperty.call(value, '__wrapped__'),
|
var valWrapped = hasOwnProperty.call(value, '__wrapped__'),
|
||||||
othWrapped = hasOwnProperty.call(other, '__wrapped__');
|
othWrapped = hasOwnProperty.call(other, '__wrapped__');
|
||||||
@@ -1650,10 +1654,6 @@
|
|||||||
if (valWrapped || othWrapped) {
|
if (valWrapped || othWrapped) {
|
||||||
return baseIsEqual(valWrapped ? value.__wrapped__ : value, othWrapped ? other.__wrapped__ : other, callback, isWhere, stackA, stackB);
|
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) {
|
if (!support.argsObject) {
|
||||||
valIsArg = isArguments(value);
|
valIsArg = isArguments(value);
|
||||||
othIsArg = isArguments(other);
|
othIsArg = isArguments(other);
|
||||||
|
|||||||
Reference in New Issue
Block a user