Erik Beeson schrieb: > The "sort plugin" <http://jquery.com/dev/bugs/bug/255/> breaks in > jQuery 1.0.4 with the following error: > second argument to Function.prototype.apply must be an array > > Down in set(), called from pushStack. Apparently, the array returned > from apply isn't array enough to pass into apply down in set. I fixed > it by wrapping the sort.apply() with merge: > > jQuery.fn.sort = function() { > return this.pushStack( jQuery.merge( [].sort.apply( this, arguments > ), []), [] ); > }; > > I would just add a note to the bug page for this and move on, but I'm > wondering if this is behavior that should be incorporated into the > set() function? Are there other things expecting to pass > not-quite-array objects to pushStack and have them dealt with properly? Please just add this as a bug report, thanks.
-- Jörn Zaefferer http://bassistance.de _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
