0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}