fix: whoops

This commit is contained in:
cha0s 2019-05-05 17:28:52 -05:00
parent eab27a5c3a
commit 4d18430260

View File

@ -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);