diff --git a/src/event.js b/src/event.js index a7900c98..42655c9b 100644 --- a/src/event.js +++ b/src/event.js @@ -382,7 +382,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