We should always update the entities cache on addEntity.

Updating the entity cache only when we receive an event from a root
entity means that we lose events sent by individual child entities.
This commit is contained in:
Fabio Manganiello 2023-09-15 00:45:38 +02:00
parent 1020b63da7
commit 4223576016
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -168,10 +168,11 @@ export default {
methods: {
addEntity(entity) {
this.entities[entity.id] = entity
if (entity.parent_id != null)
return // Only group entities that have no parent
this.entities[entity.id] = entity;
['id', 'type', 'category', 'plugin'].forEach((attr) => {
if (entity[attr] == null)
return