fix testing fail

This commit is contained in:
fuxiaohei 2014-07-17 16:48:10 +08:00
parent c372328f88
commit 38188098c5
1 changed files with 3 additions and 3 deletions

View File

@ -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