Skip to content

Commit

Permalink
Fix inArray for positive start indices
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Sep 19, 2011
1 parent 6ece8f1 commit b7ebbb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ jQuery.extend({
}

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++ ) {
if ( array[ i ] === elem ) {
Expand Down

0 comments on commit b7ebbb9

Please sign in to comment.