Forgot to make sure that oldData actually had data in it before the copy attempt.

This commit is contained in:
jeresig 2009-12-22 13:28:46 -05:00
parent 7d0c18034e
commit 9360cccc9e

View file

@ -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;