Switched to using slice instead of join to get the correct results.
This commit is contained in:
parent
2b481b93cf
commit
39a77c2d02
|
@ -2,8 +2,7 @@ var runtil = /Until$/,
|
||||||
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
||||||
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
||||||
rmultiselector = /,/,
|
rmultiselector = /,/,
|
||||||
slice = Array.prototype.slice,
|
slice = Array.prototype.slice;
|
||||||
join = Array.prototype.join;
|
|
||||||
|
|
||||||
// Implement the identical functionality for filter and not
|
// Implement the identical functionality for filter and not
|
||||||
var winnow = function( elements, qualifier, keep ) {
|
var winnow = function( elements, qualifier, keep ) {
|
||||||
|
@ -138,7 +137,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
slice: function() {
|
slice: function() {
|
||||||
return this.pushStack( slice.apply( this, arguments ),
|
return this.pushStack( slice.apply( this, arguments ),
|
||||||
"slice", join.call(arguments, ",") );
|
"slice", slice.call(arguments).join(",") );
|
||||||
},
|
},
|
||||||
|
|
||||||
map: function( callback ) {
|
map: function( callback ) {
|
||||||
|
@ -187,7 +186,7 @@ jQuery.each({
|
||||||
ret = ret.reverse();
|
ret = ret.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.pushStack( ret, name, join.call(arguments, ",") );
|
return this.pushStack( ret, name, slice.call(arguments).join(",") );
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue