diff options
author | brandonaaron <brandon.aaron@gmail.com> | 2010-02-27 01:31:33 -0600 |
---|---|---|
committer | brandonaaron <brandon.aaron@gmail.com> | 2010-02-27 01:31:33 -0600 |
commit | 7d5da0ee030b1962ff1ff57b0221a02dfdc2886a (patch) | |
tree | 310a58bbc3b95bdeccd7d8b88f9e387009d5f1a6 /src/event.js | |
parent | 9e06903a99caf5619d0db858ed3d24f0e6ee15db (diff) | |
download | jquery-7d5da0ee030b1962ff1ff57b0221a02dfdc2886a.tar.gz jquery-7d5da0ee030b1962ff1ff57b0221a02dfdc2886a.zip |
Make sure events exist before trying to access them in jQuery.event.handle and removed unnecessary var statement. Fixes #6163.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js index bfe2dd1af..5369b85bd 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 |