mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Add mid check to createCache bailout.
This commit is contained in:
@@ -277,9 +277,11 @@
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
first = array[0],
|
||||
mid = array[(length / 2) | 0],
|
||||
last = array[length - 1];
|
||||
|
||||
if (first && typeof first == 'object' && last && typeof last == 'object') {
|
||||
if (first && typeof first == 'object' &&
|
||||
mid && typeof mid == 'object' && last && typeof last == 'object') {
|
||||
return false;
|
||||
}
|
||||
var cache = getObject();
|
||||
|
||||
Reference in New Issue
Block a user