Skip to content

Commit 39a77c2

Browse files
committed
Switched to using slice instead of join to get the correct results.
1 parent 2b481b9 commit 39a77c2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/traversing.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ var runtil = /Until$/,
22
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
33
// Note: This RegExp should be improved, or likely pulled from Sizzle
44
rmultiselector = /,/,
5-
slice = Array.prototype.slice,
6-
join = Array.prototype.join;
5+
slice = Array.prototype.slice;
76

87
// Implement the identical functionality for filter and not
98
var winnow = function( elements, qualifier, keep ) {
@@ -138,7 +137,7 @@ jQuery.fn.extend({
138137

139138
slice: function() {
140139
return this.pushStack( slice.apply( this, arguments ),
141-
"slice", join.call(arguments, ",") );
140+
"slice", slice.call(arguments).join(",") );
142141
},
143142

144143
map: function( callback ) {
@@ -187,7 +186,7 @@ jQuery.each({
187186
ret = ret.reverse();
188187
}
189188

190-
return this.pushStack( ret, name, join.call(arguments, ",") );
189+
return this.pushStack( ret, name, slice.call(arguments).join(",") );
191190
};
192191
});
193192

0 commit comments

Comments
 (0)