Change declared converter type

This commit is contained in:
Benjamin Carleski
2020-04-08 08:49:11 -07:00
parent 525513cdea
commit 5bbf68e432
@@ -32,13 +32,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
=> propertyType.EditorAlias.InvariantEquals(Constants.PropertyEditors.Aliases.BlockList);
/// <inheritdoc />
public override Type GetPropertyValueType(IPublishedPropertyType propertyType)
{
var contentTypes = propertyType.DataType.ConfigurationAs<BlockListConfiguration>().Blocks;
return contentTypes.Length == 1
? typeof(IEnumerable<>).MakeGenericType(ModelType.For(contentTypes[0].Alias))
: typeof(IEnumerable<IPublishedElement>);
}
public override Type GetPropertyValueType(IPublishedPropertyType propertyType) => typeof(BlockListModel);
/// <inheritdoc />
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)