Skip to content

Commit

Permalink
mixins/active-link: Simplify and fix view-registry lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 authored Sep 23, 2016
1 parent 874014a commit 005ea54
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 005ea54

Please sign in to comment.