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: lookup/register and singleton flag behavior #19491

Merged
merged 2 commits into from
May 24, 2021

Conversation

runspired
Copy link
Contributor

I noticed this evening that getOwner(this).lookup('thing:foo', { singleton: false }) was no longer working as documented here https://api.emberjs.com/ember/3.25/classes/ApplicationInstance/methods/lookup?anchor=lookup

As best as I can tell, this API has been broken for at least 5 years. Given the long length of time this has gone unnoticed, we may simply desire to remove this functionality entirely and not restore it. Users have an alternative using factoryFor.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

This definitely seems like you are right (and this PR fixes it). It seems odd that no one noticed the issue though.

@rwjblue rwjblue merged commit d28a09c into emberjs:master May 24, 2021
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.

2 participants