From 04f3b0725063729128642be96746f8ef83ca309d Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 9 Oct 2019 03:45:42 -0500 Subject: [PATCH] fix: send along super props properly in toNetwork --- packages/entity/entity.synchronized.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/entity/entity.synchronized.js b/packages/entity/entity.synchronized.js index bcd417a..abc4414 100644 --- a/packages/entity/entity.synchronized.js +++ b/packages/entity/entity.synchronized.js @@ -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() {