From 34a0210d9da7a38bcfd7eaf93ba197056740dc21 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 29 Oct 2019 08:53:00 +0100 Subject: [PATCH] AB3329 - Handle empty strings from nested content --- .../PropertyEditors/ContentPickerPropertyEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs index 0e6eaa9254..c09b3b6930 100644 --- a/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs @@ -37,9 +37,9 @@ namespace Umbraco.Web.PropertyEditors public IEnumerable 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)); }