From 449d4f6813e57f94cb9711cf1ba3bd977224c6f5 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 9 Oct 2021 22:28:20 +0300 Subject: [PATCH] tooltip.js: use a loop --- js/src/tooltip.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index ef5b9fa82..407fa5930 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -286,9 +286,10 @@ class Tooltip extends BaseComponent { } } - this._activeTrigger[TRIGGER_CLICK] = false - this._activeTrigger[TRIGGER_FOCUS] = false - this._activeTrigger[TRIGGER_HOVER] = false + for (const trigger of [TRIGGER_CLICK, TRIGGER_FOCUS, TRIGGER_HOVER]) { + this._activeTrigger[trigger] = false + } + this._isHovered = false const complete = () => {