Skip to content

Commit

Permalink
update runtime.go
Browse files Browse the repository at this point in the history
  • Loading branch information
vircoys committed Dec 28, 2022
1 parent 3c40e15 commit e192b1c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/engine/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ func searchListAndMap(ctx *Context, obj any, index []*ast.Node) (any, ast.DType,
var ok bool
cur, ok = curVal[key.(string)]
if !ok {
return nil, ast.Invalid, NewRunError(ctx,
"key not found", i.StartPos())
return nil, ast.Nil, nil
}
case []any:
if keyType != ast.Int {
Expand Down

0 comments on commit e192b1c

Please sign in to comment.