Add mid check to createCache bailout.

This commit is contained in:
John-David Dalton
2013-09-17 22:53:10 -07:00
parent d6aed16e7c
commit 70147396a4

View File

@@ -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();