mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Ensure matches methods match arrays with duplicate values. [closes #2270]
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -5010,10 +5010,12 @@
|
||||
break;
|
||||
}
|
||||
// Recursively compare arrays (susceptible to call stack limits).
|
||||
if (isUnordered) {
|
||||
if (!arraySome(other, function(othValue) {
|
||||
return arrValue === othValue ||
|
||||
equalFunc(arrValue, othValue, customizer, bitmask, stack);
|
||||
if (seen) {
|
||||
if (!arraySome(other, function(othValue, othIndex) {
|
||||
if (!seen.has(othIndex) &&
|
||||
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
|
||||
return seen.add(othIndex);
|
||||
}
|
||||
})) {
|
||||
result = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user