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

TypeError: Cannot read property 'lookup' of undefined #81

Open
psbanka opened this issue Jul 11, 2017 · 2 comments
Open

TypeError: Cannot read property 'lookup' of undefined #81

psbanka opened this issue Jul 11, 2017 · 2 comments

Comments

@psbanka
Copy link

psbanka commented Jul 11, 2017

I believe this is related to a regression in Ember 2.13.0-beta, but I thought I'd file an issue in order to track it. We are getting an error in href-to here: https://github.com/intercom/ember-href-to/blob/master/addon/helpers/href-to.js#L6 when testing:

const $result = Ember.$(`<div>${helper.compute([ event ])}</div>`);
assert.equal($result.text(), 'Version 511 was activated', 'full text');

Where our helper simply calls hrefTo:

hrefTo('configure.service.version', version)

The fix to this was to change the aforementioned like 6 in href-to.js to:

const container = getOwner(context) || context.container;
let router = container.lookup('router:main');

which was recommended in a similar issue in the torii project, here: https://github.com/Vestorly/torii/issues/349#issuecomment-302141236

@psbanka
Copy link
Author

psbanka commented Jul 11, 2017

Related to: emberjs/ember.js#15492

@krisselden
Copy link

anyone have a reproduction or specific Safari versions/platforms?

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

No branches or pull requests

2 participants