mirror of
https://github.com/spf13/viper
synced 2025-05-06 12:17:18 +00:00
Merge 0931e9e810
into 16990631d4
This commit is contained in:
commit
bc2725c3f7
1 changed files with 4 additions and 2 deletions
6
viper.go
6
viper.go
|
@ -802,8 +802,10 @@ func (v *Viper) find(key string) interface{} {
|
|||
if source != nil {
|
||||
if reflect.TypeOf(source).Kind() == reflect.Map {
|
||||
val := v.searchMap(cast.ToStringMap(source), path[1:])
|
||||
jww.TRACE.Println(key, "found in nested config:", val)
|
||||
return val
|
||||
if val != nil {
|
||||
jww.TRACE.Println(key, "found in nested config:", val)
|
||||
return val
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue