Commit c75c9a8e authored by Amey Sakhadeo's avatar Amey Sakhadeo Committed by Richard Gibson

Fix #14313: Optimize jQuery.merge for size. Close gh-1344.

parent 83396ba8
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment