aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tooltip.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 3d3130bb5..cf8b8e118 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -486,13 +486,17 @@ class Tooltip {
(event) => this._leave(event)
)
}
-
- $(this.element).closest('.modal').on(
- 'hide.bs.modal',
- () => this.hide()
- )
})
+ $(this.element).closest('.modal').on(
+ 'hide.bs.modal',
+ () => {
+ if (this.element) {
+ this.hide()
+ }
+ }
+ )
+
if (this.config.selector) {
this.config = {
...this.config,