Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'common/maps/params.go')
-rw-r--r--common/maps/params.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/maps/params.go b/common/maps/params.go
index ecb63d7a5..1f0856598 100644
--- a/common/maps/params.go
+++ b/common/maps/params.go
@@ -37,7 +37,11 @@ func getNested(m map[string]interface{}, indices []string) (interface{}, string,
first := indices[0]
v, found := m[strings.ToLower(cast.ToString(first))]
if !found {
+ if len(indices) == 1 {
+ return nil, first, m
+ }
return nil, "", nil
+
}
if len(indices) == 1 {