Forgot to make sure that oldData actually had data in it before the copy attempt.
authorjeresig <jeresig@gmail.com>
Tue, 22 Dec 2009 18:28:46 +0000 (13:28 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 22 Dec 2009 18:28:46 +0000 (13:28 -0500)
src/manipulation.js

index 27bc0b4..2af2d7e 100644 (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;