mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
$.inArray doesn't crush IE6 and Chrome if second argument is null
or undefined
This commit is contained in:
parent
2053d1c621
commit
9c18eb2c15
@ -678,6 +678,10 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
inArray: function( elem, array ) {
|
||||
if (!jQuery.isArray(array))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( indexOf ) {
|
||||
return indexOf.call( array, elem );
|
||||
|
Loading…
Reference in New Issue
Block a user