Fix inArray for positive start indices

This commit is contained in:
timmywil 2011-09-12 21:46:16 -04:00
parent 6ece8f138f
commit b7ebbb9142

View File

@ -691,7 +691,7 @@ jQuery.extend({
} }
len = array.length; len = array.length;
i = i && i < 0 ? Math.max( 0, len + i ) : 0; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
for ( ; i < len; i++ ) { for ( ; i < len; i++ ) {
if ( array[ i ] === elem ) { if ( array[ i ] === elem ) {