TypeError: infinityModel.pushObjects is not a function
See original GitHub issueI use Ember 2.4.1 with ember-data 2.4.0 I have a problem when I use RSVP hash as a route model:
return Ember.RSVP.hash({
feed: this.store.findRecord('rssfeed', params.feed_id),
items: this.infinityModel('rssitem', {
perPage: 5,
startingPage: 1,
filter: {
feed: params.feed_id
}
})
});
Initial loading works fine but I have an error on update:
ember.debug.js:32123 TypeError: infinityModel.pushObjects is not a function
at _doUpdate (route.js:308)
at _nextPageLoaded (route.js:329)
at route.js:246
at tryCatch (ember.debug.js:53542)
at invokeCallback (ember.debug.js:53557)
at publish (ember.debug.js:53525)
at ember.debug.js:32081
at Queue.invoke (ember.debug.js:333)
at Object.Queue.flush (ember.debug.js:397)
at Object.DeferredActionQueues.flush (ember.debug.js:205)
I can see that infinityModel.pushObjects
is undefined in route.js:308
:
_doUpdate: function _doUpdate(newObjects) {
var infinityModel = this._infinityModel();
return infinityModel.pushObjects(newObjects.get('content'));
},
How can I solve the problem?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
pushobject is not a function emberjs - Stack Overflow
You have a typo. You're pushing to the actual model instead of the books hasMany relationship: actions: { addCollection(model) { model.
Read more >https://raw.githubusercontent.com/ember-infinity/e...
pushObjects is not a function ... Uncaught TypeError: Cannot read property 'offset' of undefined ... "Could not fetch Infinity Model" masks other errors ......
Read more >Safari TypeError: 'undefined' is not a function (evaluating ...
I have a piece of code in angular2 with TypeScript in which on change of select box dropdown, html table data changes.
Read more >ember-infinity - npm
Simple, flexible infinite scroll for Ember CLI Apps.. Latest version: 2.3.0, last published: a year ago. Start using ember-infinity in your ...
Read more >Top 5 ember-infinity Code Examples - Snyk
import Route from '@ember/routing/route'; import InfinityModel from ... afterInfinityModel(newObjects/*, infinityModel*/) { // smoke test. not really doing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hhff Thank you so much, that worked great.
try this @JasonLin37