From 0b86000d041ccd0364cc532a2dc327a65de8bd34 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 18 Jan 2021 07:57:41 -0600 Subject: [PATCH] fix: iteration --- packages/entity/src/entity-list-view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/entity/src/entity-list-view.js b/packages/entity/src/entity-list-view.js index 58f28d2..6a02121 100644 --- a/packages/entity/src/entity-list-view.js +++ b/packages/entity/src/entity-list-view.js @@ -25,8 +25,9 @@ export default class EntityListView extends Container { } renderTick(elapsed) { - for (let i = 0; i < this.entityList.entities.length; i++) { - this.entityList.entities[i].renderTick(elapsed); + const entities = Object.values(this.entityList.entities); + for (let i = 0; i < entities.length; i++) { + entities[i].renderTick(elapsed); } super.renderTick(elapsed); }