mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Issue #329, special check for the common and magical 'length' property.
This commit is contained in:
@@ -675,6 +675,8 @@
|
||||
}
|
||||
// Ensure that both values are objects.
|
||||
if (typeA != 'object') return false;
|
||||
// Arrays or Arraylikes with different lengths are not equal.
|
||||
if (a.length !== b.length) return false;
|
||||
// Objects with different constructors are not equal.
|
||||
if (a.constructor !== b.constructor) return false;
|
||||
// Assume equality for cyclic structures. The algorithm for detecting cyclic structures is
|
||||
|
||||
Reference in New Issue
Block a user