From b6840c6e866ce5e47ae9b189f857aabf97e2110a Mon Sep 17 00:00:00 2001 From: Patrick Fisher Date: Wed, 28 Jun 2017 11:49:33 -0700 Subject: [PATCH] Guard against fatal error if this.$() is undefined --- addon/components/sticky-container.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/components/sticky-container.js b/addon/components/sticky-container.js index 0c8f39e..4264c61 100644 --- a/addon/components/sticky-container.js +++ b/addon/components/sticky-container.js @@ -21,6 +21,6 @@ export default Ember.Component.extend({ }), teardownSticky: Ember.on('willDestroyElement', function() { - this.$().unstick(); + if (this.$()) this.$().unstick(); }), });