Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#511 closed bug (fixed)

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];

Change History (1)

comment:1 Changed 16 years ago by joern

Resolution: fixed
Status: newclosed

Fixed in SVN.

Note: See TracTickets for help on using tickets.