From 003323264e3da78657cbbc18ae189acd4dde8ff7 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 f397b1f7167d..18a58d5b8e87 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -220,7 +220,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'))