Skip to content

Commit afa0d91

Browse files
committed
Internal logic in value converter should be based IPublishedContent and not IPublishedElement
1 parent a3aa0a4 commit afa0d91

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Skybrud.Umbraco.MultiNodeTreePicker/PropertyEditors/ValueConverters/MntpValueConverter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ public override object ConvertIntermediateToObject(IPublishedElement owner, IPub
6666

6767
switch (value) {
6868

69-
// If "value" is a single element, we can call the converter directly
70-
case IPublishedElement element:
71-
return converter.Convert(propertyType, element);
69+
// If "value" is a single item, we can call the converter directly
70+
case IPublishedContent item:
71+
return converter.Convert(propertyType, item);
7272

73-
// If "value" is a list of elements, we call the converter for each item, and make sure to return a
73+
// If "value" is a list of items, we call the converter for each item, and make sure to return a
7474
// list of the type specified by the converter
75-
case List<IPublishedElement> elements:
75+
case List<IPublishedContent> items:
7676
Type type = converter.GetType(propertyType);
77-
return elements
77+
return items
7878
.Select(x => converter.Convert(propertyType, x))
7979
.Cast(type)
8080
.ToList(type);

0 commit comments

Comments
 (0)