fix: send along super props properly in toNetwork

This commit is contained in:
cha0s 2019-10-09 03:45:42 -05:00
parent 99dc832866
commit 04f3b07250

View File

@ -393,14 +393,16 @@ export class Entity extends decorate(Resource) {
toNetwork(informed) {
const json = {
...super.toJSON(),
instanceUuid: this.instanceUuid,
traits: {},
};
for (const type in this._traits) {
json.traits[type] = this._traits[type].toNetwork(informed);
}
return this.mergeDiff(json);
return {
...super.toJSON(),
instanceUuid: this.instanceUuid,
...this.mergeDiff(json),
};
}
toJSON() {