Skip to content

Commit

Permalink
Fall back to object if PublishedPropertyType modelType is null (#13553)
Browse files Browse the repository at this point in the history
* add null check

* return object when type is null
  • Loading branch information
CyberReiter committed Mar 8, 2023
1 parent 30abbb0 commit 0cfc1fb
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,4 +1,4 @@
using System.Diagnostics;
using System.Diagnostics;
using System.Xml.Linq;
using System.Xml.XPath;
using Umbraco.Cms.Core.PropertyEditors;
Expand Down Expand Up @@ -190,7 +190,7 @@ private void InitializeLocked()
}

_cacheLevel = _converter?.GetPropertyCacheLevel(this) ?? PropertyCacheLevel.Snapshot;
_modelClrType = _converter == null ? typeof (object) : _converter.GetPropertyValueType(this);
_modelClrType = _converter?.GetPropertyValueType(this) ?? typeof(object);
}

/// <inheritdoc />
Expand Down

0 comments on commit 0cfc1fb

Please sign in to comment.