Commit 9c18eb2c authored by Anton Ryzhov's avatar Anton Ryzhov

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

parent 2053d1c6
...@@ -678,6 +678,10 @@ jQuery.extend({ ...@@ -678,6 +678,10 @@ jQuery.extend({
}, },
inArray: function( elem, array ) { inArray: function( elem, array ) {
if (!jQuery.isArray(array))
{
return -1;
}
if ( indexOf ) { if ( indexOf ) {
return indexOf.call( array, elem ); return indexOf.call( array, elem );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment