return done when the collection is empty (#313)
Co-authored-by: Dan Absher <DAbsher@columbiabank.com>
This commit is contained in:
parent
9c4dbad39c
commit
122f5fa454
|
|
@ -48,6 +48,11 @@ namespace Elsa.Activities.ControlFlow.Activities
|
|||
var collection = await expressionEvaluator.EvaluateAsync(CollectionExpression, context, cancellationToken);
|
||||
var index = CurrentIndex;
|
||||
|
||||
if (collection.Count == 0)
|
||||
{
|
||||
return Done();
|
||||
}
|
||||
|
||||
if (index >= collection.Count)
|
||||
{
|
||||
context.EndScope();
|
||||
|
|
|
|||
Loading…
Reference in a new issue