resolve nil array
@@ -51,7 +51,7 @@ func ParseMapSource(source string) (from string, params []string, err error) {
// GetMapValue return the value from map base on the path
func GetMapValue(sourceMap map[string]interface{}, keys []string) (interface{}, error) {
- if keys[0] == constant.DefaultBodyAll {
+ if len(keys) > 0 && keys[0] == constant.DefaultBodyAll {
return sourceMap, nil
}
_, ok := sourceMap[keys[0]]
