aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/tooltip.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets/tooltip.js')
-rw-r--r--ui/widgets/tooltip.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/widgets/tooltip.js b/ui/widgets/tooltip.js
index f1cea47d1..06282338a 100644
--- a/ui/widgets/tooltip.js
+++ b/ui/widgets/tooltip.js
@@ -352,7 +352,10 @@ $.widget( "ui.tooltip", {
// tooltips will handle this in destroy.
if ( target[ 0 ] !== this.element[ 0 ] ) {
events.remove = function() {
- this._removeTooltip( this._find( target ).tooltip );
+ var targetElement = this._find( target );
+ if ( targetElement ) {
+ this._removeTooltip( targetElement.tooltip );
+ }
};
}