aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrwldrn <waldron.rick@gmail.com>2011-06-15 11:14:52 -0400
committerrwldrn <waldron.rick@gmail.com>2011-06-15 11:14:52 -0400
commit5c3b9e0c24dbb31245e9266dcd20fface92747eb (patch)
treee30cee1796f71003d84cb64f93f1027a34a95ad0 /src
parentd59b0f3e27827d189b8b2595142ec6bbc3941dd9 (diff)
downloadjquery-5c3b9e0c24dbb31245e9266dcd20fface92747eb.tar.gz
jquery-5c3b9e0c24dbb31245e9266dcd20fface92747eb.zip
jQuery.clone() check that destination child nodes are not null. Fixes #9587
Diffstat (limited to 'src')
-rw-r--r--src/manipulation.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 439b9596b..2f41feb9a 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -564,7 +564,10 @@ jQuery.extend({
// with an element if you are cloning the body and one of the
// elements on the page has a name or id of "length"
for ( i = 0; srcElements[i]; ++i ) {
- cloneFixAttributes( srcElements[i], destElements[i] );
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ cloneFixAttributes( srcElements[i], destElements[i] );
+ }
}
}
@@ -762,4 +765,4 @@ function evalScript( i, elem ) {
}
}
-})( jQuery ); \ No newline at end of file
+})( jQuery );