]> source.dussan.org Git - jquery.git/commitdiff
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 27bc0b46b600cfdd032be6837eb78e40a4db41e7..2af2d7e7dc80598794e2d7d2b72b3a82d9b914bb 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;