]> source.dussan.org Git - jquery.git/commitdiff
Make sure that the node exists before attempting to clone.
authorjeresig <jeresig@gmail.com>
Thu, 17 Dec 2009 18:15:12 +0000 (13:15 -0500)
committerjeresig <jeresig@gmail.com>
Thu, 17 Dec 2009 18:15:12 +0000 (13:15 -0500)
src/manipulation.js

index 17cfa842dc6d9f48ac389cdd5701233e728aa214..d5523dd79c6f9c92ca7854b9fff3efea104e2a6a 100644 (file)
@@ -279,7 +279,7 @@ function cloneCopyEvent(orig, ret) {
        var i = 0;
 
        ret.each(function(){
-               if ( this.nodeName !== orig[i].nodeName ) {
+               if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
                        return;
                }