Use cacheHas in equalArrays.

This commit is contained in:
John-David Dalton
2016-08-17 11:40:52 -07:00
parent 1bf125eebd
commit 9841e6aa4c

View File

@@ -1024,7 +1024,7 @@
}
/**
* Checks if a cache value for `key` exists.
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
@@ -5437,9 +5437,9 @@
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!seen.has(othIndex) &&
if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
return seen.add(othIndex);
return seen.push(othIndex);
}
})) {
result = false;