Skip to content
Permalink
Browse files
Fix #14313: Optimize jQuery.merge for size. Close gh-1344.
  • Loading branch information
ameyms authored and gibson042 committed Aug 30, 2013
1 parent 83396ba commit c75c9a8
Showing 1 changed file with 2 additions and 6 deletions.
@@ -552,18 +552,14 @@ jQuery.extend({
},

merge: function( first, second ) {
var l = second.length,
var l = +second.length,
i = first.length,
j = 0;

if ( typeof l === "number" ) {
if ( l ) {
for ( ; j < l; j++ ) {
first[ i++ ] = second[ j ];
}
} else {
while ( second[j] !== undefined ) {
first[ i++ ] = second[ j++ ];
}
}

first.length = i;

0 comments on commit c75c9a8

Please sign in to comment.