1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 13:46:42 +02:00

fix: fix possible bug on event handler. (#36561)

some browsers validate the empty object as `true`, so is safer to use an explicit check
This commit is contained in:
GeoSot
2022-06-14 08:33:53 +03:00
committed by GitHub
parent 5f75413735
commit ec8166a90f

View File

@@ -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
}