mirror of
https://github.com/jquery/jquery.git
synced 2026-01-23 05:18:12 -05: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:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user