From c953096a404497a4e28342342a7f103e2e65c9c2 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 28 Mar 2023 22:34:06 +0300 Subject: [PATCH] event-handler: switch to const (#38362) --- js/src/dom/event-handler.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index 0fb3b35eb6..97cf3041ef 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -279,8 +279,7 @@ const EventHandler = { defaultPrevented = jQueryEvent.isDefaultPrevented() } - let evt = new Event(event, { bubbles, cancelable: true }) - evt = hydrateObj(evt, args) + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args) if (defaultPrevented) { evt.preventDefault()