From f7a89c8e74001f5d5a02a36dc61d5738ae63893e Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:22:58 +0530 Subject: [PATCH] prevent extracting hadleEvent method as an intermediate value --- src/diff/props.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diff/props.js b/src/diff/props.js index c0d452c0d5..ac23a2cd1d 100644 --- a/src/diff/props.js +++ b/src/diff/props.js @@ -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); } }; }