Skip to content

Commit

Permalink
prevent extracting hadleEvent method as an intermediate value
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy authored Oct 28, 2024
1 parent 5b99b99 commit f7a89c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/diff/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ function createEventProxy(useCapture) {
} else if (e._dispatched < eventHandler._attached) {
return;
}
return ("handleEvent" in eventHandler ? eventHandler.handleEvent : eventHandler)(options.event ? options.event(e) : e);
if (options.event) e = options.event(e);
return "handleEvent" in eventHandler ? eventHandler.handleEvent(e) : eventHandler(e);
}
};
}
Expand Down

0 comments on commit f7a89c8

Please sign in to comment.