Don't attempt to resolve URLs for element types

This commit is contained in:
Kenn Jacobsen
2019-01-23 12:13:55 +01:00
committed by Sebastiaan Janssen
parent 57fb9888a2
commit b709ed4aa3
2 changed files with 6 additions and 1 deletions

View File

@@ -185,7 +185,7 @@ namespace Umbraco.Web.Routing
/// </remarks>
public string GetUrl(IPublishedContent content, UrlProviderMode mode, string culture = null, Uri current = null)
{
if (content == null)
if (content == null || content.ItemType == PublishedItemType.Element)
return "#";
// this the ONLY place where we deal with default culture - IUrlProvider always receive a culture