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
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-11-25 20:39:13 +0300
committerGitHub <noreply@github.com>2021-11-25 20:39:13 +0300
commit374eeecfbcabae20da08ce00d0f9268bb67b1e5e (patch)
tree7917e6bd3816dfb8872c54d0db8e5fffedde04d1
parent91ad255e07d3d16f2ea88ca5b49bbe569ea5e2b4 (diff)
tooltip.js: use array.includes instead of for iteration (#35127)
-rw-r--r--js/src/tooltip.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index c845961011..bc59e6e946 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -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) {