From 268044c6bf30fb49b5be14feaa16851a6e538899 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Thu, 10 Sep 2020 06:57:16 +0700 Subject: [PATCH] IMPR: events router --- src/js/_events.router.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/_events.router.js b/src/js/_events.router.js index 9022363..c2ba1f0 100644 --- a/src/js/_events.router.js +++ b/src/js/_events.router.js @@ -16,17 +16,18 @@ const EventsUI = (($) => { class EventsUI { static process(el, args) { + let modEl = el; const eventName = args[0]; const tagName = typeof el !== undefined ? $(el).prop('tagName') : null; switch (tagName) { case 'HTML': case 'BODY': - el = $W; + modEl = $W; break; } - return [el, args]; + return [modEl, args]; } }