Fall back to object if PublishedPropertyType modelType is null (#13553)

* add null check

* return object when type is null

(cherry picked from commit 0cfc1fb664)
This commit is contained in:
CyberReiter
2023-03-08 12:14:22 +01:00
committed by Sebastiaan Janssen
parent 6b309dc3be
commit 5fcbd4e4cd

View File

@@ -1,4 +1,4 @@
using System.Diagnostics;
using System.Diagnostics;
using System.Xml.Linq;
using System.Xml.XPath;
using Umbraco.Cms.Core.PropertyEditors;
@@ -190,7 +190,7 @@ namespace Umbraco.Cms.Core.Models.PublishedContent
}
_cacheLevel = _converter?.GetPropertyCacheLevel(this) ?? PropertyCacheLevel.Snapshot;
_modelClrType = _converter == null ? typeof (object) : _converter.GetPropertyValueType(this);
_modelClrType = _converter?.GetPropertyValueType(this) ?? typeof(object);
}
/// <inheritdoc />