From: jeresig Date: Tue, 22 Dec 2009 18:28:46 +0000 (-0500) Subject: Forgot to make sure that oldData actually had data in it before the copy attempt. X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=9360cccc9eb276cfd571066d87bb099d5d109516 Forgot to make sure that oldData actually had data in it before the copy attempt. --- diff --git a/src/manipulation.js b/src/manipulation.js index 27bc0b4..2af2d7e 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -283,7 +283,7 @@ function cloneCopyEvent(orig, ret) { return; } - var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData.events; + var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events; if ( events ) { delete curData.handle;