Skip to content

Commit 4d22ca1

Browse files
committed
move distinct content types dictionary initialization to outer scope
1 parent bc80222 commit 4d22ca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Deploy.Contrib.Connectors/ValueConnectors/InnerContentConnector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public string GetValue(Property property, ICollection<ArtifactDependency> depend
6060
if (innerContent == null)
6161
return null;
6262

63+
var distinctContentTypes = new Dictionary<GuidUdi, IContentType>();
6364
foreach (var innerContentItem in innerContent)
6465
{
6566
var contentType = _contentTypeService.GetContentType(innerContentItem.IcContentTypeGuid);
@@ -70,7 +71,6 @@ public string GetValue(Property property, ICollection<ArtifactDependency> depend
7071

7172
// ensure the content type is added as a unique dependency
7273
var contentTypeUdi = contentType.GetUdi();
73-
var distinctContentTypes = new Dictionary<GuidUdi,IContentType>();
7474
if (distinctContentTypes.ContainsKey(contentTypeUdi) == false)
7575
{
7676
distinctContentTypes.Add(contentTypeUdi,contentType);

0 commit comments

Comments
 (0)