mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 01:55:04 -05:00
Merge pull request #465 from anton-ryzhov/master
Fixes #10076. $.inArray crashes IE6 and Chrome if second argument is `null` or `undefined` (Thanks anton-ryzhov!)
This commit is contained in:
@@ -679,6 +679,9 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
inArray: function( elem, array ) {
|
||||
if ( !array ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( indexOf ) {
|
||||
return indexOf.call( array, elem );
|
||||
|
||||
Reference in New Issue
Block a user