diff --git a/config/json.go b/config/json.go index 12b92e7d..7214a686 100644 --- a/config/json.go +++ b/config/json.go @@ -151,12 +151,12 @@ func (c *JsonConfigContainer) getData(key string) interface{} { } for _, key := range sectionKey[1:] { if v, ok := curValue.(map[string]interface{}); ok { - if v2, ok := v[key]; ok { - return v2 + if curValue, ok = v[key]; !ok { + return nil } } } - return nil + return curValue } if v, ok := c.data[key]; ok { return v