Add TestEvalWithArrayOfValuesAndInvalidIndex
This commit is contained in:
1 parent
e3038f0e80
commit
57ef931d38
2 files changed
+11
-1
No files matched your search
@@ -41,7 +41,7 @@ func extractValue(currentKey string, value interface{}) interface{} {
|
||||
tmp := strings.SplitN(currentKey, "[", 3)
|
||||
arrayIndex, err := strconv.Atoi(strings.Replace(tmp[1], "]", "", 1))
|
||||
if err != nil {
|
||||
return value
|
||||
return nil
|
||||
}
|
||||
currentKey := tmp[0]
|
||||
// if currentKey contains only an index (i.e. [0] or 0)
|
||||
|
||||
Reference in new issue
Block a user