Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2022-06-14 01:50:17 +0300
committerGeoSot <geo.sotis@gmail.com>2022-06-14 01:50:17 +0300
commitb337e6f011e1ac0247cd96761b9a9700d227f3ea (patch)
treea0f204d9630371e9489f27d5c3b4dd418c426d93
parent5f75413735d8779aeefe0097af9dc5a416208ae5 (diff)
fix: fix possible bug on event handler.gs/fix-possible-issue-event-handler
some browsers validate the empty object as `true`, so is safer to use an explicit check
-rw-r--r--js/src/dom/event-handler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js
index 8bed9b39bb..87f936b41d 100644
--- a/js/src/dom/event-handler.js
+++ b/js/src/dom/event-handler.js
@@ -234,7 +234,7 @@ const EventHandler = {
if (typeof callable !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY.
- if (!storeElementEvent) {
+ if (!Object.keys(storeElementEvent).length) {
return
}