Added null check on raw JSON to prevent null reference error deserializing the grid
(cherry picked from commit bcea0f645a)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
5f5773b0c0
commit
d0eee32f1d
@@ -165,6 +165,10 @@ namespace Umbraco.Web.PropertyEditors
|
||||
public IEnumerable<UmbracoEntityReference> GetReferences(object value)
|
||||
{
|
||||
var rawJson = value == null ? string.Empty : value is string str ? str : value.ToString();
|
||||
|
||||
if (rawJson.IsNullOrWhiteSpace())
|
||||
yield break;
|
||||
|
||||
DeserializeGridValue(rawJson, out var richTextEditorValues, out var mediaValues);
|
||||
|
||||
foreach (var umbracoEntityReference in richTextEditorValues.SelectMany(x =>
|
||||
|
||||
Reference in New Issue
Block a user