From 005ea54411c35da7cef99976f9eca80758a347ed Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 23 Sep 2016 21:51:10 +0200 Subject: [PATCH] mixins/active-link: Simplify and fix view-registry lookup --- addon/mixins/active-link.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addon/mixins/active-link.js b/addon/mixins/active-link.js index d2ea4e9..647822b 100644 --- a/addon/mixins/active-link.js +++ b/addon/mixins/active-link.js @@ -19,8 +19,7 @@ export default Ember.Mixin.create({ Ember.run.scheduleOnce('afterRender', this, function(){ let childLinkSelector = this.get('linkSelector'); let childLinkElements = this.$(childLinkSelector); - let applicationContainer = Ember.getOwner(this).application.__container__; - let viewRegistry = applicationContainer.lookup('-view-registry:main'); + let viewRegistry = Ember.getOwner(this).lookup('-view-registry:main'); let childLinkViews = childLinkElements.toArray().map( view => viewRegistry[view.id]