diff --git a/src/classes/EventEntity.ts b/src/classes/EventEntity.ts index 504e1b3..94309a9 100644 --- a/src/classes/EventEntity.ts +++ b/src/classes/EventEntity.ts @@ -18,8 +18,9 @@ export abstract class EventEntity implements IEventEntity { } private updateState () { - for (const propertyName of Object.keys(this.state)) { - this[propertyName] = this.state[propertyName] + const state = this.state + for (const propertyName of Object.keys(state)) { + this[propertyName] = state[propertyName] } }