vendredi 2 janvier 2015

Ember.js "calling set on destroyed object" Error after call to unloadRecord

Within a sessioning system for a project I'm working on, I'm calling unloadRecord on a record like so:



user.unloadRecord();


I'm not calling destroyRecord because I want to manually unload the record from the store without persisting it to the server. Removing the record from the store in this manner works perfectly, but when I log into the same account--which requires loading a the same user record manually using store.push--I get the following error message:



Uncaught Error: Assertion Failed: calling set on destroyed object ember.js:3902


Again, this occurs at the following line after calling user.unloadRecord():



var user = this.store.push("user", newUser);


Is there any way to avoid this error?





Aucun commentaire:

Enregistrer un commentaire