Skip to content

Commit

Permalink
Start the index at -1
Browse files Browse the repository at this point in the history
  • Loading branch information
l46kok committed Sep 19, 2023
1 parent 5f76b80 commit f3950e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cel/folding.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func pruneOptionalListElements(ctx *OptimizerContext, e ast.Expr) {
}
updatedElems := []ast.Expr{}
updatedIndices := []int32{}
newOptIndex := 0
newOptIndex := -1
for _, e := range elems {
newOptIndex++
if !l.IsOptional(int32(newOptIndex)) {
Expand Down

0 comments on commit f3950e9

Please sign in to comment.