diff options
Diffstat (limited to 'resources/page/page_matcher.go')
-rw-r--r-- | resources/page/page_matcher.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/page/page_matcher.go b/resources/page/page_matcher.go index 306c2d03c..858def5ef 100644 --- a/resources/page/page_matcher.go +++ b/resources/page/page_matcher.go @@ -174,6 +174,9 @@ func DecodeCascade(logger loggers.Logger, handleLegacyFormat bool, in any) (*map func mapToPageMatcherParamsConfig(m map[string]any) (PageMatcherParamsConfig, error) { var pcfg PageMatcherParamsConfig + if pcfg.Fields == nil { + pcfg.Fields = make(maps.Params) + } for k, v := range m { switch strings.ToLower(k) { case "_target", "target": @@ -193,9 +196,6 @@ func mapToPageMatcherParamsConfig(m map[string]any) (PageMatcherParamsConfig, er } } default: - if pcfg.Fields == nil { - pcfg.Fields = make(maps.Params) - } pcfg.Fields[k] = v } |