Skip to content

Commit 9c18eb2

Browse files
committed
$.inArray doesn't crush IE6 and Chrome if second argument is null or undefined
1 parent 2053d1c commit 9c18eb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,10 @@ jQuery.extend({
678678
},
679679

680680
inArray: function( elem, array ) {
681+
if (!jQuery.isArray(array))
682+
{
683+
return -1;
684+
}
681685

682686
if ( indexOf ) {
683687
return indexOf.call( array, elem );

0 commit comments

Comments
 (0)