Skip to content

Commit

Permalink
Improve EventEntity usage of state getter
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavopch authored and khaosdoctor committed Jan 9, 2019
1 parent 4ddc55b commit c93ddf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/classes/EventEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export abstract class EventEntity<TEntity> 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]
}
}

Expand Down

0 comments on commit c93ddf6

Please sign in to comment.