This is an example app that demos store.findAll causing a "Maximum call stack size exceeded" error. It demos the error three modes:
- using store as an injected service in a helper
- looking up the store service without injecting it per se and using the store in a helper
- using store as an injected service in a component and yielding the result of findAll as a block parameter
Trying to use the result of the findAll in a component causes the error.
The only workaround I've been able to find is for mode 3. If the value getter is a computed field with no parameters, then the error doesn't occur.
The application.hbs has both the helper syntax examples commented out. If you restore one of them, you will get the error. You can also change the my-records-component.js file to comment out the @computed decorator and cause the error in mode 3.
This app uses ember-local-storage so we can use findAll. I have found the same behavior, however, with my production API though. Also, make sure you empty your local storage when done!
You will need the following things properly installed on your computer.
- Git
- Node.js (with npm)
- Ember CLI
- Google Chrome
git clone <repository-url>
this repositorycd helper-promise-test
npm install
ember serve
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
npm run lint:hbs
npm run lint:js
npm run lint:js -- --fix
ember build
(development)ember build --environment production
(production)
Specify what it takes to deploy your app.