From 017966524ae1ac96452d5a55417b325cb51ba44c Mon Sep 17 00:00:00 2001 From: GeoSot Date: Wed, 12 Jan 2022 10:59:40 +0200 Subject: [PATCH] add check before removal --- js/src/tooltip.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 132f23458bb6..6306bb9c4ca1 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -222,7 +222,11 @@ class Tooltip extends BaseComponent { return } - this.tip.remove() // todo v6 remove this OR make it optional + // todo v6 remove this OR make it optional + if (this.tip) { + this.tip.remove() + } + const tip = this._getTipElement() this._element.setAttribute('aria-describedby', tip.getAttribute('id'))