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 c75c9a8ebb5d2483daa68bec799e0d770083a811
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/core.js
@@ -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.
You can’t perform that action at this time.