diff --git a/core/engine/src/vm/opcode/iteration/iterator.rs b/core/engine/src/vm/opcode/iteration/iterator.rs index c4dddb79d0..26f11de937 100644 --- a/core/engine/src/vm/opcode/iteration/iterator.rs +++ b/core/engine/src/vm/opcode/iteration/iterator.rs @@ -250,8 +250,12 @@ impl Operation for IteratorReturn { return Ok(CompletionType::Normal); }; + let return_value = context.vm.get_return_value(); + let value = ret.call(&record.iterator().clone().into(), &[], context)?; + context.vm.set_return_value(return_value); + context.vm.push(value); context.vm.push(true);