Fixes PublishedContent.cs when the property index doesn't contain the alias index (due to adding a new property type and the json not matchin)

This commit is contained in:
Shannon
2018-04-24 17:15:35 +10:00
parent 6db75d4226
commit c5ca61f249

View File

@@ -261,8 +261,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
if (index < 0) return null;
//TODO: Should we log here? I think this can happen when property types are added/removed from the doc type and the json serialized properties
// no longer match the list of property types since that is how the PropertiesArray is populated.
//TODO: Does the PropertiesArray get repopulated on content save?
if (index > PropertiesArray.Length) return null;
if (index >= PropertiesArray.Length) return null;
var property = PropertiesArray[index];
return property;
}