From 892fb555477dc96f58e3f8fd5446f7990188fc21 Mon Sep 17 00:00:00 2001 From: jeresig Date: Thu, 17 Dec 2009 13:15:12 -0500 Subject: [PATCH] Make sure that the node exists before attempting to clone. --- src/manipulation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 1.7.10.4