Ensure that all items passed to rendering are element types

This commit is contained in:
Kenn Jacobsen
2019-01-16 13:05:54 +01:00
parent 93f991b140
commit 4303b4eb80
2 changed files with 9 additions and 1 deletions

View File

@@ -31,6 +31,8 @@ namespace Umbraco.Core.Models.PublishedContent
_propertyTypes = propertyTypes.ToArray();
IsElement = contentType.IsElement;
InitializeIndexes();
}
@@ -166,6 +168,11 @@ namespace Umbraco.Core.Models.PublishedContent
return index >= 0 && index < _propertyTypes.Length ? _propertyTypes[index] : null;
}
/// <summary>
/// Gets a value indicating whether this content type is for an element.
/// </summary>
public bool IsElement { get; }
#endregion
}
}