diff options
| author | XhmikosR <[email protected]> | 2020-01-07 22:07:51 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-01-07 22:07:51 +0200 |
| commit | 9c2b9ac74d4abb5ec8b7864054315de3409d5f3a (patch) | |
| tree | bdd48def07c5ef9c88c01c15554e3acada526b59 /js/src/tooltip.js | |
| parent | a7945d4501377cd42afd49c0e885b0e1923b36cc (diff) | |
| download | bootstrap-9c2b9ac74d4abb5ec8b7864054315de3409d5f3a.tar.xz bootstrap-9c2b9ac74d4abb5ec8b7864054315de3409d5f3a.zip | |
Use regex.test() when we want to check for a Boolean. (#29969)
Diffstat (limited to 'js/src/tooltip.js')
| -rw-r--r-- | js/src/tooltip.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index b4f047b70..1bc000d2c 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -747,9 +747,8 @@ class Tooltip { _cleanTipClass() { const tip = this.getTipElement() const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX) - if (tabClass !== null && tabClass.length) { - tabClass - .map(token => token.trim()) + if (tabClass !== null && tabClass.length > 0) { + tabClass.map(token => token.trim()) .forEach(tClass => tip.classList.remove(tClass)) } } |
