Skip to main content

Bug Tracker

Side navigation

#511 closed bug (fixed)

Opened December 15, 2006 06:48PM UTC

Closed December 18, 2006 10:08PM UTC

Last modified June 20, 2007 02:58AM UTC

pushStack misinterprets function args

Reported by: Dave Owned by:
Priority: major Milestone:
Component: core Version:
Keywords: Cc:
Blocked by: Blocking:
Description

The problem occurs with destructive methods like .filter(fn) that take a function argument used by the method. pushStack sees that function arg and interprets it incorrectly.

I think this should fix the problem, but only for the case of a destructive method that takes a single function arg in addition to the two (optional) trailing function args--I think that's the only kind at the moment. However, this can still run afoul of the bug where Firefox <object> elements are wrongfully interpreted as functions (see the ugly expression at the top of the jQuery() constructor.)

<<<

pushStack: function(a,args) {

var fn = args && args.length > 1 && args[args.length-1];

var fn2 = args && args.length > 2 && args[args.length-2];

>>>

Attachments (0)
Change History (1)

Changed December 18, 2006 10:08PM UTC by joern comment:1

resolution: → fixed
status: newclosed

Fixed in SVN.