diff options
author | Amey Sakhadeo <me@ameyms.com> | 2013-08-28 22:24:55 +0530 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-08-30 19:55:03 -0400 |
commit | c75c9a8ebb5d2483daa68bec799e0d770083a811 (patch) | |
tree | 022a1f4effae4cc8a5039bd97638338651b6afce /src/core.js | |
parent | 83396ba832e1169c2e82ceb8493427e5456a82e9 (diff) | |
download | jquery-c75c9a8ebb5d2483daa68bec799e0d770083a811.tar.gz jquery-c75c9a8ebb5d2483daa68bec799e0d770083a811.zip |
Fix #14313: Optimize jQuery.merge for size. Close gh-1344.
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core.js b/src/core.js index 6d5c747f4..82616eaa5 100644 --- a/src/core.js +++ b/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; |