mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 20:37:48 +00:00
Add mid check to createCache bailout.
This commit is contained in:
@@ -277,9 +277,11 @@
|
|||||||
var index = -1,
|
var index = -1,
|
||||||
length = array.length,
|
length = array.length,
|
||||||
first = array[0],
|
first = array[0],
|
||||||
|
mid = array[(length / 2) | 0],
|
||||||
last = array[length - 1];
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
var cache = getObject();
|
var cache = getObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user