From c93ddf679a611876c643a665acc89affc353cf63 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Wed, 9 Jan 2019 11:10:07 -0200 Subject: [PATCH] Improve EventEntity usage of state getter --- src/classes/EventEntity.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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] } }