1
0
mirror of synced 2024-11-25 06:16:08 +03:00

fix internal function indexOf, when undefined passed

This commit is contained in:
nicola 2012-05-29 16:48:38 +04:00
parent cb7f1da4e6
commit 23720246f2

View File

@ -70,6 +70,10 @@
function indexOf(value, array) {
var i = 0, l = array.length, v;
if (typeof value == 'undefined') {
return -1;
}
if (value.constructor === String) {
for (; i < l; i = i + 1) if (value.localeCompare(array[i]) === 0) return i;
} else {