Fixed grouping for entityGroups.id.

Unlike the other entity groupings, which are 4-layered (`grouping ->
group -> entity_id -> entity`), the grouping by ID only needs 3 layers
(`grouping -> entity_id -> entity`).
This commit is contained in:
Fabio Manganiello 2023-05-03 02:09:51 +02:00
parent cc2ec1db7f
commit 9922305ac5
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -187,9 +187,13 @@ export default {
if (entity[attr] == null) if (entity[attr] == null)
return return
if (attr == 'id')
this.entityGroups[attr][entity[attr]] = entity
else {
if (!this.entityGroups[attr][entity[attr]]) if (!this.entityGroups[attr][entity[attr]])
this.entityGroups[attr][entity[attr]] = {} this.entityGroups[attr][entity[attr]] = {}
this.entityGroups[attr][entity[attr]][entity.id] = entity this.entityGroups[attr][entity[attr]][entity.id] = entity
}
}) })
}, },