From 9c18eb2c15a762b4f3137fef9897914c80083a89 Mon Sep 17 00:00:00 2001 From: Anton Ryzhov Date: Wed, 17 Aug 2011 15:30:12 +0400 Subject: [PATCH] $.inArray doesn't crush IE6 and Chrome if second argument is `null` or `undefined` --- src/core.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core.js b/src/core.js index 7a77ae132..db832a0bf 100644 --- a/src/core.js +++ b/src/core.js @@ -678,6 +678,10 @@ jQuery.extend({ }, inArray: function( elem, array ) { + if (!jQuery.isArray(array)) + { + return -1; + } if ( indexOf ) { return indexOf.call( array, elem ); -- 2.39.5