mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Ensure that null/undefined args don't choke on native indexOf
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
parent
1d0322f0b1
commit
dcf94a58c7
@ -587,7 +587,7 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
inArray: function( elem, arr, i ) {
|
||||
return core_indexOf.call( arr, elem, i );
|
||||
return arr == null ? -1 : core_indexOf.call( arr, elem, i );
|
||||
},
|
||||
|
||||
merge: function( first, second ) {
|
||||
|
Loading…
Reference in New Issue
Block a user