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

(cherry picked from commit 0cfc1fb)
  • Loading branch information
CyberReiter authored and nul800sebastiaan committed Mar 17, 2023
1 parent 6b309dc commit 5fcbd4e
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 5fcbd4e

Please sign in to comment.