Make sure that the node exists before attempting to clone.

This commit is contained in:
jeresig 2009-12-17 13:15:12 -05:00
parent 100ed68642
commit 892fb55547

View 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;
}