From 4d18430260c607a099117d207e1553fa3d53a7f7 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 5 May 2019 17:28:52 -0500 Subject: [PATCH] fix: whoops --- packages/entity/list/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/entity/list/index.js b/packages/entity/list/index.js index c50ce91..9f15aa6 100644 --- a/packages/entity/list/index.js +++ b/packages/entity/list/index.js @@ -104,11 +104,11 @@ export class EntityList extends decorate(class {}) { removeEntity(entity) { const uuid = entity.instanceUuid; - if (!(uuid in this._entities[uuid])) { + if (!(uuid in this._entities)) { return; } delete this._entities[uuid]; - this._flatEntities.splice(index, this._flatEntities.indexOf(entity)); + this._flatEntities.splice(this._flatEntities.indexOf(entity), 1); this._entityTickers.splice(this._entityTickers.indexOf(entity.tick), 1); this.state = this.state.delete(uuid); this.emit('entityRemoved', entity);