Skip to content

Commit

Permalink
Make sure that the node exists before attempting to clone.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Dec 17, 2009
1 parent 100ed68 commit 892fb55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manipulation.js
Expand Up @@ -279,7 +279,7 @@ function cloneCopyEvent(orig, ret) {
var i = 0; var i = 0;


ret.each(function(){ ret.each(function(){
if ( this.nodeName !== orig[i].nodeName ) { if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
return; return;
} }


Expand Down

0 comments on commit 892fb55

Please sign in to comment.