0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

tooltip.js: use array.includes instead of for iteration (#35127)

This commit is contained in:
GeoSot 2021-11-25 19:39:13 +02:00 committed by GitHub
parent 91ad255e07
commit 374eeecfbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,13 +598,7 @@ class Tooltip extends BaseComponent {
}
_isWithActiveTrigger() {
for (const trigger in this._activeTrigger) {
if (this._activeTrigger[trigger]) {
return true
}
}
return false
return Object.values(this._activeTrigger).includes(true)
}
_getConfig(config) {