Complete activity if items count is 0 (#4623)
This commit is contained in:
parent
793002ac9f
commit
7fe05f491d
|
|
@ -43,6 +43,12 @@ public class ParallelForEach<T> : Activity
|
|||
var tags = new List<Guid>();
|
||||
var currentIndex = 0;
|
||||
|
||||
if (items.Count == 0)
|
||||
{
|
||||
await context.CompleteActivityAsync();
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
// For each item, declare a new variable for the work to be scheduled.
|
||||
|
|
|
|||
Loading…
Reference in a new issue