From 9a351b3531f64bc87cfae2456c628ee09224153a Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 14 Jan 2026 17:17:11 -0300 Subject: [PATCH] filter tags map should be nil when there are no tags. --- filter_easyjson.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filter_easyjson.go b/filter_easyjson.go index afc8429..1ddbfcb 100644 --- a/filter_easyjson.go +++ b/filter_easyjson.go @@ -15,7 +15,6 @@ func easyjsonDecodeFilter(in *jlexer.Lexer, out *Filter) { in.Skip() return } - out.Tags = make(TagMap) in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) @@ -97,6 +96,10 @@ func easyjsonDecodeFilter(in *jlexer.Lexer, out *Filter) { out.Search = in.String() default: if len(key) > 1 && key[0] == '#' { + if out.Tags == nil { + out.Tags = make(TagMap, 1) + } + tagValues := make([]string, 0, 40) in.Delim('[') if out.Authors == nil {