]> source.dussan.org Git - jquery.git/commitdiff
Make sure that there isn't an error if no event object exists. Fixes #8755.
authorJohn Resig <jeresig@gmail.com>
Sun, 17 Apr 2011 17:21:46 +0000 (10:21 -0700)
committerJohn Resig <jeresig@gmail.com>
Sun, 17 Apr 2011 17:21:46 +0000 (10:21 -0700)
src/event.js

index ee3606fe4c4a3644cd8691135ffbc26bbf61a270..92fe0cb3d078bc903eb74a5bf409222e71ddd67d 100644 (file)
@@ -63,7 +63,7 @@ jQuery.event = {
                        elemData.handle = eventHandle = function( e ) {
                                // Discard the second event of a jQuery.event.trigger() and
                                // when an event is called after a page has unloaded
-                               return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
+                               return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
                                        jQuery.event.handle.apply( eventHandle.elem, arguments ) :
                                        undefined;
                        };