Skip to content

Commit bc282a8

Browse files
committed
Fixes #7229 events with null handlers
1 parent 6c611e2 commit bc282a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/event.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jQuery.event = {
3636

3737
var handleObjIn, handleObj;
3838

39-
if ( handler.handler ) {
39+
if ( handler && handler.handler ) {
4040
handleObjIn = handler;
4141
handler = handleObjIn.handler;
4242
}
4343

4444
// Make sure that the function being executed has a unique ID
45-
if ( !handler.guid ) {
45+
if ( handler && !handler.guid ) {
4646
handler.guid = jQuery.guid++;
4747
}
4848

@@ -116,7 +116,7 @@ jQuery.event = {
116116

117117
handleObj.type = type;
118118
if ( !handleObj.guid ) {
119-
handleObj.guid = handler.guid;
119+
( handleObj && handler ) && ( handleObj.guid = handler.guid );
120120
}
121121

122122
// Get the current list of functions bound to this event

0 commit comments

Comments
 (0)