Skip to content

Commit

Permalink
Merge pull request #124 from bargar/master
Browse files Browse the repository at this point in the history
BUGFIX checkif component is destroyed before trying to set properties…
  • Loading branch information
Duncan Walker authored Dec 31, 2016
2 parents 6ae40d8 + ea54c11 commit 9682929
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions addon/components/tether-tooltip-and-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,13 @@ export default EmberTetherComponent.extend({

stopTether() {
run.schedule('afterRender', () => {
// can't depend on `_tether.enabled` because it's not an
// Ember property (so won't trigger cp update when changed)
this.set('_isTetherEnabled', false);
this.get('_tether').disable();
if (!this.isDestroyed && !this.isDestroying) {

// can't depend on `_tether.enabled` because it's not an
// Ember property (so won't trigger cp update when changed)
this.set('_isTetherEnabled', false);
this.get('_tether').disable();
}
});
},

Expand Down

0 comments on commit 9682929

Please sign in to comment.