Simplify wrapper inference in _.isEqual.

Former-commit-id: b4fda683ebee4c3f7dddd0cb87201306c08fa7d5
This commit is contained in:
John-David Dalton
2012-09-02 12:04:35 -07:00
parent 1837562b50
commit ec976953cd

View File

@@ -1452,12 +1452,9 @@
}
if (objectTypes[typeof a] || objectTypes[typeof b] || thorough.value) {
// unwrap any LoDash wrapped values
if (a._chain) {
a = a._wrapped;
}
if (b._chain) {
b = b._wrapped;
}
a = a._wrapped || a;
b = b._wrapped || b;
// use custom `isEqual` method if available
if (a.isEqual && isFunction(a.isEqual)) {
thorough.value = null;