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) {
|
toNetwork(informed) {
|
||||||
const json = {
|
const json = {
|
||||||
...super.toJSON(),
|
|
||||||
instanceUuid: this.instanceUuid,
|
|
||||||
traits: {},
|
traits: {},
|
||||||
};
|
};
|
||||||
for (const type in this._traits) {
|
for (const type in this._traits) {
|
||||||
json.traits[type] = this._traits[type].toNetwork(informed);
|
json.traits[type] = this._traits[type].toNetwork(informed);
|
||||||
}
|
}
|
||||||
return this.mergeDiff(json);
|
return {
|
||||||
|
...super.toJSON(),
|
||||||
|
instanceUuid: this.instanceUuid,
|
||||||
|
...this.mergeDiff(json),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
toJSON() {
|
toJSON() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user