chore: update unauthorized callback calling order (#1469)

* chore: update unauthorized callback calling order

* chore: add comments
This commit is contained in:
Kevin Wan
2022-01-20 21:09:45 +08:00
committed by GitHub
parent df0f8ed59e
commit fdc7f64d6f
3 changed files with 9 additions and 4 deletions

View File

@@ -742,7 +742,9 @@ func getValueWithChainedKeys(m Valuer, keys []string) (interface{}, bool) {
if len(keys) == 1 {
v, ok := m.Value(keys[0])
return v, ok
} else if len(keys) > 1 {
}
if len(keys) > 1 {
if v, ok := m.Value(keys[0]); ok {
if nextm, ok := v.(map[string]interface{}); ok {
return getValueWithChainedKeys(MapValuer(nextm), keys[1:])