Allow empty params.mainSections

Updates #10953
This commit is contained in:
Bjørn Erik Pedersen
2023-05-18 15:50:48 +02:00
parent 95818e27dc
commit 7c647bcaeb
4 changed files with 35 additions and 1 deletions

View File

@@ -367,7 +367,7 @@ type ConfigCompiled struct {
func (c *ConfigCompiled) SetMainSectionsIfNotSet(sections []string) {
c.mu.Lock()
defer c.mu.Unlock()
if len(c.MainSections) > 0 {
if c.MainSections != nil {
return
}
c.MainSections = sections