vendredi 17 avril 2015

Ember.js: Cannot call get with 'isNew' on an undefined object

I have a model with findQuery to send REST request to retrieve data from server, but when the data returned, an exception printed in console:



Error: Assertion Failed: Cannot call get with 'isNew' on an undefined object.
at new Error (native)
at Error.EmberError (http://localhost:4200/assets/vendor.js:22563:21)
at Object.Ember.default.assert (http://localhost:4200/assets/vendor.js:15711:13)
at get (http://localhost:4200/assets/vendor.js:26145:22)
at null.<anonymous> (http://localhost:4200/assets/vendor.js:68265:14)
at Descriptor.ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:20906:26)
at Object.get (http://localhost:4200/assets/vendor.js:26166:19)
at exports.default.mixin.Mixin.create.get (http://localhost:4200/assets/vendor.js:40899:27)
at ember$data$lib$system$relationships$state$relationship$$Relationship.flushCanonical (http://localhost:4200/assets/vendor.js:67250:36)
at Queue.invoke (http://localhost:4200/assets/vendor.js:11420:18)


The following shows the call stack: enter image description here


The code is just OK before I use grunt, with ember-data 1.0 beta 7. Now I use ember-cli with ember-data 1.0 beta 16.


Any advice?


Aucun commentaire:

Enregistrer un commentaire