Skip to content

Commit

Permalink
Remove bad event copy (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abbondanzo committed Jul 3, 2023
1 parent 3db8947 commit 2848af9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/comparisons/events/on/modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ function addEventListener(el, eventName, eventHandler, selector) {
if (!e.target) return;
const el = e.target.closest(selector);
if (el) {
const newEvent = Object.create(e, {
target: {
value: el
}
});
eventHandler.call(el, newEvent);
eventHandler.call(el, e);
}
};
el.addEventListener(eventName, wrappedHandler);
Expand Down

0 comments on commit 2848af9

Please sign in to comment.