From: jeresig Date: Thu, 17 Dec 2009 18:15:12 +0000 (-0500) Subject: Make sure that the node exists before attempting to clone. X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=892fb555477dc96f58e3f8fd5446f7990188fc21 Make sure that the node exists before attempting to clone. --- diff --git a/src/manipulation.js b/src/manipulation.js index 17cfa84..d5523dd 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -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; }