fix internal function indexOf, when undefined passed
This commit is contained in:
parent
cb7f1da4e6
commit
23720246f2
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user