Skip to content

Commit

Permalink
Prevent errors when click-to-copy is destroyed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Oct 26, 2015
1 parent 28cd6a9 commit e6a797c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/components/click-to-copy/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export default Ember.Component.extend({

showMessage: function() {
this.set('isTooltipped', true);
Ember.run.later(this, 'set', 'isTooltipped', false, 3000);

Ember.run.later(() => {
if (!this.isDestroying && !this.isDestroyed) {
this.set('isTooltipped', false);
}
});
}
});

0 comments on commit e6a797c

Please sign in to comment.