Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ember 2.8+ #18

Merged
merged 2 commits into from
Sep 18, 2016
Merged

Fix ember 2.8+ #18

merged 2 commits into from
Sep 18, 2016

Conversation

Robdel12
Copy link
Contributor

@Robdel12 Robdel12 commented Sep 14, 2016

This should fix the addon for Ember 2.8 and now works with Glimmer 2 also.

It's important to note that this will only support Ember 2.3+.

@@ -17,9 +17,11 @@ export default Ember.Mixin.create({
Ember.run.schedule('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') || Ember.View.views;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if Ember.View.views is ever used.

@Robdel12 Robdel12 changed the title WIP: fix ember 2.8 Fix ember 2.8+ Sep 15, 2016
@Robdel12
Copy link
Contributor Author

@alexspeller this should be ready for your eyes

When using `didRender` it caused an infinate render loop. Switching to
`didReceiveAttrs` fixes the issue
@alexspeller alexspeller merged commit cf1d8fd into alexspeller:master Sep 18, 2016
@alexspeller
Copy link
Owner

👍 awesome, thanks for this. Making a new release now

@alexspeller
Copy link
Owner

Version 0.3.0 has been published to npm, thanks again for your help!

@Turbo87
Copy link
Contributor

Turbo87 commented Sep 23, 2016

I've just updated to Ember 2.8 and v0.3 of this addon and I'm now seeing the following error in my tests:

undefined is not an object (evaluating '_ember['default'].getOwner(this).application.__container__')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants