chore: remove jank

This commit is contained in:
cha0s 2019-04-05 16:06:07 -04:00
parent 1cbce46561
commit 3ebff2e28f

View File

@ -11,8 +11,10 @@ export class Informed extends decorate(Trait) {
initialize() {
this.entityReducer = this.createIndexedReducer();
this._informState = I.Map();
this._sentSelf = false;
this._informState = I.fromJS({
// Let the client know who they are.
selfEntity: this.entity.instanceUuid,
});
this._socket = undefined;
}
@ -108,11 +110,6 @@ export class Informed extends decorate(Trait) {
// Take diff.
let diff = stateSynchronizer.diff(this._informState);
this._informState = stateSynchronizer.state;
// Let the client know who they are.
if (!this._sentSelf) {
diff.selfEntity = this.entity.instanceUuid;
this._sentSelf = true;
}
diff = this.reduceStateDiff(diff);
// Emit!
if (diff) {