From ea54c11f930f3e0039610f56e196b8201e236242 Mon Sep 17 00:00:00 2001 From: Jeremiah Bargar Date: Thu, 8 Dec 2016 16:59:26 -0500 Subject: [PATCH] BUGFIX checkif component is destroyed before trying to set properties on it --- addon/components/tether-tooltip-and-popover.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/addon/components/tether-tooltip-and-popover.js b/addon/components/tether-tooltip-and-popover.js index 39297784..8df2af78 100644 --- a/addon/components/tether-tooltip-and-popover.js +++ b/addon/components/tether-tooltip-and-popover.js @@ -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(); + } }); },