1
0

fix merge attributes

This commit is contained in:
Arpad Ryszka 2025-10-09 21:39:06 +02:00
parent e6953fa77d
commit e4ec75f676

View File

@ -57,10 +57,14 @@ func mergeAttributes(c []any) Attributes {
}
to := Attributes{values: make(map[string]any)}
for _, ai := range a {
for _, name := range ai.names {
for i := len(a) - 1; i >= 0; i-- {
for _, name := range a[i].names {
if _, set := to.values[name]; set {
continue
}
to.names = append(to.names, name)
to.values[name] = ai.values[name]
to.values[name] = a[i].values[name]
}
}