fix: send along super props properly in toNetwork
This commit is contained in:
parent
99dc832866
commit
04f3b07250
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user