$.inArray doesn't crush IE6 and Chrome if second argument is null or undefined

This commit is contained in:
Anton Ryzhov 2011-08-17 15:30:12 +04:00
parent 2053d1c621
commit 9c18eb2c15

View File

@ -678,6 +678,10 @@ jQuery.extend({
},
inArray: function( elem, array ) {
if (!jQuery.isArray(array))
{
return -1;
}
if ( indexOf ) {
return indexOf.call( array, elem );