aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorAmey Sakhadeo <me@ameyms.com>2013-08-28 22:24:55 +0530
committerRichard Gibson <richard.gibson@gmail.com>2013-08-30 19:55:03 -0400
commitc75c9a8ebb5d2483daa68bec799e0d770083a811 (patch)
tree022a1f4effae4cc8a5039bd97638338651b6afce /src/core.js
parent83396ba832e1169c2e82ceb8493427e5456a82e9 (diff)
downloadjquery-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.js8
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;