Fix language menu config regression

Fixes #8672
This commit is contained in:
Bjørn Erik Pedersen
2021-06-22 18:17:49 +02:00
parent 4a9d408fe0
commit 093dacab29
4 changed files with 135 additions and 20 deletions

View File

@@ -93,20 +93,6 @@ func LoadConfig(d ConfigSourceDescriptor, doWithConfig ...func(cfg config.Provid
}
}
// TODO(bep) improve this. This is currently needed to get the merge correctly.
if l.cfg.IsSet("languages") {
langs := l.cfg.GetParams("languages")
for _, lang := range langs {
langp := lang.(maps.Params)
if _, ok := langp["menus"]; !ok {
langp["menus"] = make(maps.Params)
}
if _, ok := langp["params"]; !ok {
langp["params"] = make(maps.Params)
}
}
}
l.cfg.SetDefaultMergeStrategy()
// We create languages based on the settings, so we need to make sure that