我有一个使用findQuery的模型来发送REST请求以从服务器检索数据,但是当数据返回时,控制台中会打印一个异常:
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)
以下显示了调用堆栈:
当我使用grunt和ember-data 1.0 beta 7时,代码就可以了。现在我使用ember-cli和ember-data 1.0 beta 16。
有什么建议吗?
此图显示了有效负载: