AB3326 - Handle empty strings from nested content

This commit is contained in:
Bjarke Berg
2019-10-29 08:52:47 +01:00
parent 5ddc961df3
commit 8d4de3de55

View File

@@ -41,9 +41,9 @@ namespace Umbraco.Web.PropertyEditors
public IEnumerable<UmbracoEntityReference> GetReferences(object value)
{
if (value == null) yield break;
var asString = value is string str ? str : value?.ToString();
var asString = value is string str ? str : value.ToString();
if (string.IsNullOrEmpty(asString)) yield break;
yield return new UmbracoEntityReference(Udi.Parse(asString));
}