fix: discard updates to already-destroyed entities

This commit is contained in:
cha0s 2019-04-19 17:57:33 -05:00
parent e56cad0ad1
commit 384424b84c

View File

@ -75,6 +75,10 @@ export class EntityList extends decorate(class {}) {
entity.patchState([step]);
}
else {
// We got an update for an entity we've already destroyed. Discard!
if (localUuid) {
return;
}
// New entity. Create with patch as traits.
const newEntity = (new Entity()).fromJSON({
traits: step.value,