fix: only diff entity list if exists
This commit is contained in:
parent
3cfd46b982
commit
fc030608bb
|
@ -29,6 +29,10 @@ class InformedBase extends Trait {
|
||||||
}
|
}
|
||||||
|
|
||||||
reduceStateDiffForEntityList(diff, position) {
|
reduceStateDiffForEntityList(diff, position) {
|
||||||
|
// Only if entity list exists.
|
||||||
|
if (!diff.entityList) {
|
||||||
|
return diff;
|
||||||
|
}
|
||||||
// Reduce the entity list.
|
// Reduce the entity list.
|
||||||
const informSize = this.entity.informSize.toJS();
|
const informSize = this.entity.informSize.toJS();
|
||||||
const nearbyEntities = this.entity.nearbyEntities(informSize, position);
|
const nearbyEntities = this.entity.nearbyEntities(informSize, position);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user