mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
common/maps: Do not return error on params dot access on incompatible types
This error was introduced in 0.56 and has shown some site breakage in the wild. Fixes #6121
This commit is contained in:
@@ -16,8 +16,6 @@ package maps
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
@@ -72,7 +70,7 @@ func traverseNestedParams(keySegments []string, lookupFn func(key string) interf
|
||||
v, key, owner := traverseParams(rest, m)
|
||||
return v, key, owner, nil
|
||||
default:
|
||||
return nil, "", nil, errors.Errorf("unsupported Params type: %T", result)
|
||||
return nil, "", nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user