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

Run the Ember Data initializer when Ember Data is loaded as an Ember … #3999

Merged
merged 1 commit into from
Dec 16, 2015

Conversation

bmac
Copy link
Member

@bmac bmac commented Dec 15, 2015

…CLI addon.

I believe this fixes. http://discuss.emberjs.com/t/jsonapiadapter-not-recognized-findall-is-not-a-function/9307

In globals mode this code https://github.com/emberjs/data/blob/master/addon/-private/ember-initializer.js#L44-L80 registers the Ember initializers. However, it appears when Ember Data is loaded as an Ember CLI addon the Ember.onLoad callback is being called after Ember's initializers step has already completed.

I suspect there is a better way of doing this. Possibly by ensuring https://github.com/emberjs/data/blob/master/addon/-private/ember-initializer.js#L44-L80 only gets added to the globals build.

@bmac bmac force-pushed the run-initializer-as-addon branch from cd83410 to 9ac62ad Compare December 15, 2015 21:58
@fivetanley
Copy link
Member

👍 We can move the /-private/ember-intializer code to only be included in the globals build in a different commit, that makes sense to me.

fivetanley added a commit that referenced this pull request Dec 16, 2015
Run the Ember Data initializer when Ember Data is loaded as an Ember …
@fivetanley fivetanley merged commit c8b4010 into emberjs:master Dec 16, 2015
@bmac bmac deleted the run-initializer-as-addon branch December 16, 2015 18:08
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