AB3328 - Fixed two bugs - One if links was absolute and not references, and one if the value was empty string.

This commit is contained in:
Bjarke Berg
2019-10-30 08:50:15 +01:00
parent 12cb370578
commit f305dd45cb

View File

@@ -179,12 +179,20 @@ namespace Umbraco.Web.PropertyEditors
{
var asString = value == null ? string.Empty : value is string str ? str : value.ToString();
if (string.IsNullOrEmpty(asString)) yield break;
var links = JsonConvert.DeserializeObject<List<MultiUrlPickerValueEditor.LinkDto>>(asString);
foreach (var link in links)
{
yield return new UmbracoEntityReference(link.Udi);
if (link.Udi != null) // Links can be absolute links without a Udi
{
yield return new UmbracoEntityReference(link.Udi);
}
}
}
}
}