Commit 1960f28c authored by jeresig's avatar jeresig

Make sure no exception is thrown if no event handler is found (which is the...

Make sure no exception is thrown if no event handler is found (which is the case for applets, objects, and embeds).
parent 05aaa339
...@@ -57,6 +57,12 @@ jQuery.event = { ...@@ -57,6 +57,12 @@ jQuery.event = {
handle = jQuery.data( elem, "handle", eventHandle ); handle = jQuery.data( elem, "handle", eventHandle );
} }
// If no handle is found then we must be trying to bind to one of the
// banned noData elements
if ( !handle ) {
return;
}
// Add elem as a property of the handle function // Add elem as a property of the handle function
// This is to prevent a memory leak with non-native // This is to prevent a memory leak with non-native
// event in IE. // event in IE.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment