fix #10: check group length before manipulation

This commit is contained in:
2024-02-10 13:16:13 +01:00
committed by T.v.Dein
parent 5c0aadd54a
commit 9ede62037a
2 changed files with 2 additions and 2 deletions

View File

@@ -212,7 +212,7 @@ func (h *Handler) appendAttr(wa map[string]interface{}, a slog.Attr) {
}
wa[name] = innerwa
if a.Key != "" {
if a.Key != "" && len(h.groups) > 0 {
h.groups = h.groups[:len(h.groups)-1]
}