Skip to content
5 changes: 4 additions & 1 deletion ui/widgets/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 theTarget = this._find( target );
if ( theTarget !== null ) {
this._removeTooltip( theTarget.tooltip );
}
};
}

Expand Down