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:
parent
5f75413735
commit
ec8166a90f
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user