Skip to content

Commit

Permalink
Merge pull request #111 in TSI/content-management from feature/SRQ-11…
Browse files Browse the repository at this point in the history
…942-2 to release/2.0

* commit '11246ba88e212670159fd4e14e5fc52b75e0b341':
  SRQ-11942 : Fixed cyclic dependency
  • Loading branch information
majiccode committed Oct 15, 2019
2 parents b1d282a + 11246ba commit 03551e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sdl.Web.DXAResolver/Resolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,17 @@ private List<Component> GatherLinkedComponents(Component component)
}
}

HashSet<TcmUri> linkedComponents = new HashSet<TcmUri>();
foreach (var linkField in componentLinkFields)
{
if (linkField.Values != null)
{
components.AddRange(linkField.Values);
foreach (var c in linkField.Values)
{
if (linkedComponents.Contains(c.Id)) continue;
linkedComponents.Add(c.Id);
components.Add(c);
}
}
}
return components;
Expand Down

0 comments on commit 03551e4

Please sign in to comment.