Skip to content
Permalink
Browse files

Ensure that null/undefined args don't choke on native indexOf

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Dec 21, 2012
1 parent 1d0322f commit dcf94a58c7419083cb10ea645c97c8d8c740810b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core.js
@@ -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 ) {

0 comments on commit dcf94a5

Please sign in to comment.
You can’t perform that action at this time.