From 9360cccc9eb276cfd571066d87bb099d5d109516 Mon Sep 17 00:00:00 2001 From: jeresig Date: Tue, 22 Dec 2009 13:28:46 -0500 Subject: [PATCH] Forgot to make sure that oldData actually had data in it before the copy attempt. --- src/manipulation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manipulation.js b/src/manipulation.js index 27bc0b46b..2af2d7e7d 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; -- 2.39.5