Skip to content

Commit

Permalink
chore: skipping empty enrichment
Browse files Browse the repository at this point in the history
  • Loading branch information
ronimizy committed Feb 6, 2025
1 parent 1f6d992 commit 4d0976e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public async IAsyncEnumerable<TModel> EnrichAsync(
[EnumeratorCancellation] CancellationToken cancellationToken)
{
models = models.ToArray();

if (models.Count() is 0)
yield break;

var context = new EnrichmentContext<TKey, TModel, TState>(models, state);

Expand All @@ -51,4 +54,4 @@ public async IAsyncEnumerable<TModel> EnrichAsync(
yield return model;
}
}
}
}

0 comments on commit 4d0976e

Please sign in to comment.