filter tags map should be nil when there are no tags.
This commit is contained in:
@@ -15,7 +15,6 @@ func easyjsonDecodeFilter(in *jlexer.Lexer, out *Filter) {
|
|||||||
in.Skip()
|
in.Skip()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
out.Tags = make(TagMap)
|
|
||||||
in.Delim('{')
|
in.Delim('{')
|
||||||
for !in.IsDelim('}') {
|
for !in.IsDelim('}') {
|
||||||
key := in.UnsafeFieldName(false)
|
key := in.UnsafeFieldName(false)
|
||||||
@@ -97,6 +96,10 @@ func easyjsonDecodeFilter(in *jlexer.Lexer, out *Filter) {
|
|||||||
out.Search = in.String()
|
out.Search = in.String()
|
||||||
default:
|
default:
|
||||||
if len(key) > 1 && key[0] == '#' {
|
if len(key) > 1 && key[0] == '#' {
|
||||||
|
if out.Tags == nil {
|
||||||
|
out.Tags = make(TagMap, 1)
|
||||||
|
}
|
||||||
|
|
||||||
tagValues := make([]string, 0, 40)
|
tagValues := make([]string, 0, 40)
|
||||||
in.Delim('[')
|
in.Delim('[')
|
||||||
if out.Authors == nil {
|
if out.Authors == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user