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
path: root/js
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2022-06-14 08:33:53 +0300
committerGitHub <noreply@github.com>2022-06-14 08:33:53 +0300
commitec8166a90fcf914372a91646581fbe793ad22cc5 (patch)
treea0f204d9630371e9489f27d5c3b4dd418c426d93 /js
parent5f75413735d8779aeefe0097af9dc5a416208ae5 (diff)
fix: fix possible bug on event handler. (#36561)
some browsers validate the empty object as `true`, so is safer to use an explicit check
Diffstat (limited to 'js')
-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
}