aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/tooltip.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/tooltip.js b/js/tooltip.js
index 250e48e5c..943002199 100644
--- a/js/tooltip.js
+++ b/js/tooltip.js
@@ -317,9 +317,11 @@
function complete() {
if (that.hoverState != 'in') $tip.detach()
- that.$element
- .removeAttr('aria-describedby')
- .trigger('hidden.bs.' + that.type)
+ if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
+ }
callback && callback()
}
@@ -478,6 +480,7 @@
that.$tip = null
that.$arrow = null
that.$viewport = null
+ that.$element = null
})
}