Don't panic on empty yaml config params

Fixes #11047
This commit is contained in:
Bjørn Erik Pedersen
2023-05-30 11:38:29 +02:00
parent 3f497d496f
commit a7d6b1413f
2 changed files with 25 additions and 2 deletions

View File

@@ -729,8 +729,8 @@ func fromLoadConfigResult(fs afero.Fs, logger loggers.Logger, res config.LoadCon
isMultiHost = true
}
mergedConfig.Set(kk, vv)
if cfg.IsSet(kk) {
rootv := cfg.Get(kk)
rootv := cfg.Get(kk)
if rootv != nil && cfg.IsSet(kk) {
// This overrides a root key and potentially needs a merge.
if !reflect.DeepEqual(rootv, vv) {
switch vvv := vv.(type) {