mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
yuchi spotted duplication
This commit is contained in:
@@ -641,9 +641,9 @@
|
|||||||
// Unwrap any wrapped objects.
|
// Unwrap any wrapped objects.
|
||||||
if (a._chain) a = a._wrapped;
|
if (a._chain) a = a._wrapped;
|
||||||
if (b._chain) b = b._wrapped;
|
if (b._chain) b = b._wrapped;
|
||||||
// One of them implements an isEqual()
|
// Invoke a custom `isEqual` method if one is provided.
|
||||||
if (a.isEqual) return a.isEqual(b);
|
if (_.isFunction(a.isEqual)) return a.isEqual(b);
|
||||||
if (b.isEqual) return b.isEqual(a);
|
if (_.isFunction(b.isEqual)) return b.isEqual(a);
|
||||||
// Compare object types.
|
// Compare object types.
|
||||||
var typeA = typeof a;
|
var typeA = typeof a;
|
||||||
if (typeA != typeof b) return false;
|
if (typeA != typeof b) return false;
|
||||||
@@ -675,8 +675,6 @@
|
|||||||
}
|
}
|
||||||
// Ensure that both values are objects.
|
// Ensure that both values are objects.
|
||||||
if (typeA != 'object') return false;
|
if (typeA != 'object') return false;
|
||||||
// Invoke a custom `isEqual` method if one is provided.
|
|
||||||
if (_.isFunction(a.isEqual)) return a.isEqual(b);
|
|
||||||
// Assume equality for cyclic structures. The algorithm for detecting cyclic structures is
|
// Assume equality for cyclic structures. The algorithm for detecting cyclic structures is
|
||||||
// adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
// adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
||||||
var length = stack.length;
|
var length = stack.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user