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

Attempting to register an unknown factory: config:in-viewport #15

Closed
fsmanuel opened this issue Apr 29, 2015 · 2 comments
Closed

Attempting to register an unknown factory: config:in-viewport #15

fsmanuel opened this issue Apr 29, 2015 · 2 comments

Comments

@fsmanuel
Copy link

Using ember-lazy-image I now get this error.
When I add viewportConfig to the environment.js it is gone.

To fix that we should add a fallback:

// app/initializers/viewport-config.js
application.register('config:in-viewport', viewportConfig || {}, { instantiate: false });

I tried const { viewportConfig } = config || {}; but that didn't worked so I did viewportConfig || {}

@poteto
Copy link
Collaborator

poteto commented Apr 29, 2015

Yeah that's a good catch, I'll issue a bugfix. Thanks!

@fsmanuel
Copy link
Author

I learn so much es6 features by reading your code!

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