]> source.dussan.org Git - jquery.git/commitdiff
Make sure no exception is thrown if no event handler is found (which is the case...
authorjeresig <jeresig@gmail.com>
Wed, 13 Jan 2010 16:24:54 +0000 (11:24 -0500)
committerjeresig <jeresig@gmail.com>
Wed, 13 Jan 2010 16:24:54 +0000 (11:24 -0500)
src/event.js

index 02349984abcdbc84a13acf124693d3300c634f4b..c826f17b14fcec3522803525f59221be1649a736 100644 (file)
@@ -57,6 +57,12 @@ jQuery.event = {
                        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
                // This is to prevent a memory leak with non-native
                // event in IE.