2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Use regex.test() when we want to check for a Boolean. (#29969)

This commit is contained in:
XhmikosR
2020-01-07 22:07:51 +02:00
committed by GitHub
parent a7945d4501
commit 9c2b9ac74d
4 changed files with 6 additions and 8 deletions
+2 -3
View File
@@ -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))
}
}