Ignore isSorted if _.indexOf is customized.

This commit is contained in:
John-David Dalton
2014-07-13 00:26:27 -07:00
parent f7330cce14
commit 12f04650de
2 changed files with 9 additions and 4 deletions

View File

@@ -2397,11 +2397,12 @@
}
var index = -1,
indexOf = getIndexOf(),
prereq = !isSorted && indexOf === baseIndexOf,
prereq = indexOf === baseIndexOf,
isLarge = prereq && createCache && length >= 200,
isCommon = prereq && !isLarge,
result = [];
isSorted = prereq && isSorted;
if (isLarge) {
var seen = createCache();
indexOf = cacheIndexOf;