Skip to content

Commit

Permalink
guard tooltip event handler when destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcobain committed Jan 12, 2018
1 parent cf172a9 commit 37444e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addon/components/paper-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ export default Component.extend({
anchorElement.addEventListener('touchcancel', leaveHandler);
anchorElement.addEventListener('mouseleave', leaveHandler);

this.set('renderTooltip', true);
this.set('hideTooltip', false);
if (!this.isDestroyed) {
this.set('renderTooltip', true);
this.set('hideTooltip', false);
}
};

anchorElement.addEventListener('focus', enterEventHandler);
Expand Down

0 comments on commit 37444e6

Please sign in to comment.