From dcf94a58c7419083cb10ea645c97c8d8c740810b Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 21 Dec 2012 15:24:42 -0500 Subject: [PATCH] Ensure that null/undefined args don't choke on native indexOf Signed-off-by: Rick Waldron --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 6fad83b2a..4f99e0f4c 100644 --- a/src/core.js +++ b/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 ) { -- 2.39.5