Skip to content

Commit

Permalink
Merge pull request #318 from SimonCropp/fixMultiEnumerationBug
Browse files Browse the repository at this point in the history
fix multi enumeration bug
  • Loading branch information
martincostello authored Apr 26, 2021
2 parents e86a9bd + 98203d0 commit 46316fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HttpClientInterception/BundleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using JustEat.HttpClientInterception.Bundles;

namespace JustEat.HttpClientInterception
Expand Down Expand Up @@ -79,14 +80,16 @@ public static HttpClientInterceptorOptions RegisterBundle(

if (bundle.Items != null)
{
var templateValuesList = templateValues.ToList();

foreach (var item in bundle.Items)
{
if (item == null || item.Skip)
{
continue;
}

builders.Add(BundleItemConverter.FromItem(item, templateValues));
builders.Add(BundleItemConverter.FromItem(item, templateValuesList));
}
}

Expand Down

0 comments on commit 46316fa

Please sign in to comment.