Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/traversing.js
5 src/traversing.js
View
@@ -196,7 +196,8 @@ jQuery.each({
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
+ var ret = jQuery.map( this, fn, until ),
+ args = slice.call(arguments);
if ( !runtil.test( name ) ) {
selector = until;
@@ -212,7 +213,7 @@ jQuery.each({
ret = ret.reverse();
}
- return this.pushStack( ret, name, slice.call(arguments).join(",") );
+ return this.pushStack( ret, name, args.join(",") );
};
});

5 comments on commit 52a0238

Nicolas Chambrier

What was the issue ? It seems it has to be known for any JS developer :)

Anton M.

There seems to be no test case / ticket associated with this change. Also any information on why this was done is missing.

The only thing I was able to find is a single failing test in the jQuery test suite (before this change) but with the Chrome Dev version (10.something).
In Chrome Stable (8.something) and Chrome Beta (9.something) this change isn't needed.
This strange behavior should be filed as a bug against the Chrome bug tracker as to me it looks like a chrome bug not a jQuery bug.

Paul Irish

Here is the detail on the Chrome issue: http://code.google.com/p/v8/issues/detail?id=1050

It appeared in the latest dev channel and is live in the chromium nightlies.

We expect to see it fixed soon, so we'll be able to revert this commit once the dev channel comes through with an update.

ajpiano has added a pull req to document this: #186

Yahel Carmon

So, the fix came through 6 months ago, but this commit with the "this should be removed" note is still in 1.6.2... Was this forgotten, or is there a reason for keeping it in there?

Paul Irish

@ajpiano see above.

Please sign in to comment.
Something went wrong with that request. Please try again.