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 untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

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