Skip to content

Commit

Permalink
Merge pull request #20 from Turbo87/patch-1
Browse files Browse the repository at this point in the history
mixins/active-link: Simplify and fix view-registry lookup
  • Loading branch information
alexspeller authored Sep 25, 2016
2 parents 874014a + 005ea54 commit d1fb317
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions addon/mixins/active-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit d1fb317

Please sign in to comment.