Make sure that there isn't an error if no event object exists. Fixes #8755.

This commit is contained in:
John Resig 2011-04-17 10:21:46 -07:00
parent 5d70c6d797
commit adef5c3550

View 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;
};