Coerce eq() argument all the time. Fixes #10616

This commit is contained in:
Rick Waldron
2011-10-30 13:13:26 -04:00
committed by Dave Methvin
parent e086c22826
commit 7cbd7a640f
2 changed files with 15 additions and 4 deletions

View File

@@ -264,9 +264,10 @@ jQuery.fn = jQuery.prototype = {
},
eq: function( i ) {
i = +i;
return i === -1 ?
this.slice( i ) :
this.slice( i, +i + 1 );
this.slice( i, i + 1 );
},
first: function() {