From 7d5da0ee030b1962ff1ff57b0221a02dfdc2886a Mon Sep 17 00:00:00 2001 From: brandonaaron Date: Sat, 27 Feb 2010 01:31:33 -0600 Subject: [PATCH] Make sure events exist before trying to access them in jQuery.event.handle and removed unnecessary var statement. Fixes #6163. --- src/event.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/event.js b/src/event.js index bfe2dd1a..5369b85b 100644 --- a/src/event.js +++ b/src/event.js @@ -374,7 +374,8 @@ jQuery.event = { namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)"); } - var events = jQuery.data(this, "events"), handlers = events[ event.type ]; + events = jQuery.data(this, "events"); + handlers = (events || {})[ event.type ]; if ( events && handlers ) { // Clone the handlers to prevent manipulation