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

Exception when registering eager singleton #70

Open
jonwallg opened this issue Mar 27, 2014 · 2 comments
Open

Exception when registering eager singleton #70

jonwallg opened this issue Mar 27, 2014 · 2 comments

Comments

@jonwallg
Copy link
Contributor

I'm getting an exception thrown when trying to register an eager singleton which I'm registering/binding within a module, like so:

@implementation MyAppModule
- (void)configure {
    [self bindClass:[Foo class] inScope:JSObjectionScopeSingleton];
    [self registerEagerSingleton:[Foo class]];
}
@end

This throws an exception in -[JSObjectionInjector initializeEagerSingletons] because there isn't a binding in the global context.

Would you be agreeable to a pull request that changes -initializeEagerSingletons to check for an entry in _context as well?

@jdewind
Copy link
Contributor

jdewind commented Mar 27, 2014

I would be agreeable to a PR for this.

@NachoSoto
Copy link
Contributor

Awesome, looks like this was fixed in #71, but it got merged into master. Now develop and master are out of sync. Which branch were you using for releases?

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

3 participants