diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-05-30 11:38:29 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-05-30 15:59:43 +0200 |
commit | a7d6b1413f7dd7fdda30b12d577b90f4bb0487ff (patch) | |
tree | 7f4d1a5017729f9f9e090ba07eccca043254f11a /config | |
parent | 3f497d496fcb002e18cd339c5850a300346b2f35 (diff) | |
download | hugo-a7d6b1413f7dd7fdda30b12d577b90f4bb0487ff.tar.gz hugo-a7d6b1413f7dd7fdda30b12d577b90f4bb0487ff.zip |
Don't panic on empty yaml config params
Fixes #11047
Diffstat (limited to 'config')
-rw-r--r-- | config/allconfig/allconfig.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go index ade7ea1be..abb955546 100644 --- a/config/allconfig/allconfig.go +++ b/config/allconfig/allconfig.go @@ -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) { |