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