If a content item has no template (i.e. route hijack), it will fail to render

This commit is contained in:
Shannon
2019-02-18 19:07:51 +11:00
parent 79c67e9c1b
commit 8ea6e2b855

View File

@@ -728,7 +728,7 @@ namespace Umbraco.Web.Routing
private ITemplate GetTemplateModel(int? templateId)
{
if (templateId.HasValue == false)
if (templateId.HasValue == false || templateId.Value == default)
{
_logger.Debug<PublishedRouter>("GetTemplateModel: No template.");
return null;