diff --git a/operator-digest.go b/operator-digest.go index 64a8230..8772021 100644 --- a/operator-digest.go +++ b/operator-digest.go @@ -48,9 +48,10 @@ func evalDigest(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error) { ctx.SetVar("#", it.Count()) if rightValue, err = opTerm.Children[1].Compute(ctx); err == nil { if rightValue == nil { - break + err = io.EOF } else { lastValue = rightValue + ctx.SetVar(kern.ControlLastResult, lastValue) } } ctx.DeleteVar("#")