fix(tooltips): correct regex match
This commit is contained in:
parent
05de310ddd
commit
c8d36ea52d
@ -191,9 +191,7 @@ export class Tooltip {
|
|||||||
destroy() {
|
destroy() {
|
||||||
this._eventManager.cleanUp();
|
this._eventManager.cleanUp();
|
||||||
this._movementObserver.unobserve();
|
this._movementObserver.unobserve();
|
||||||
for (let i = 0; i < this._element.classList.length; i++) {
|
const toolTipsRegex = RegExp(/\btooltip--.+\b/, 'g');
|
||||||
if (/tooltip--*/.test(this._element.classList[i]))
|
this._element.className = this._element.className.replace(toolTipsRegex, '');
|
||||||
this._element.classList.remove(this._element.classList.item(i));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user