Skip to content
Permalink
Browse files

Make sure events exist before trying to access them in jQuery.event.h…

…andle and removed unnecessary var statement. Fixes #6163.
  • Loading branch information
brandonaaron committed Feb 27, 2010
1 parent 9e06903 commit 7d5da0ee030b1962ff1ff57b0221a02dfdc2886a
Showing with 2 additions and 1 deletion.
  1. +2 −1 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

1 comment on commit 7d5da0e

@brandonaaron

This comment has been minimized.

Copy link
Contributor Author

@brandonaaron brandonaaron commented on 7d5da0e Feb 27, 2010

Not visible in this diff, the events and handlers are already declared as variables at the beginning of jQuery.event.handle.

Please sign in to comment.
You can’t perform that action at this time.