Skip to content

Commit ec8166a

Browse files
authored
fix: fix possible bug on event handler. (#36561)
some browsers validate the empty object as `true`, so is safer to use an explicit check
1 parent 5f75413 commit ec8166a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/src/dom/event-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const EventHandler = {
234234

235235
if (typeof callable !== 'undefined') {
236236
// Simplest case: handler is passed, remove that listener ONLY.
237-
if (!storeElementEvent) {
237+
if (!Object.keys(storeElementEvent).length) {
238238
return
239239
}
240240

0 commit comments

Comments
 (0)