summaryrefslogtreecommitdiffstats
path: root/common/maps/params.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-29 16:22:35 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-30 09:41:04 +0100
commit8a1c637c4494751046142e0ef345fce38fc1431b (patch)
tree43847875b05e6261ca204c3c565fc84db7f63bde /common/maps/params.go
parent6d95dc9d74681cba53b46e79c6e1d58d27fcdfb0 (diff)
Fix setting HUGO_MODULE_PROXY etc. via env vars
Fixes #7903
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 {