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