Add null check in allowed template check
This commit is contained in:
committed by
Sebastiaan Janssen
parent
9c28a1ff80
commit
e0ea4ef36f
@@ -135,6 +135,9 @@ namespace Umbraco.Web
|
||||
|
||||
public static bool IsAllowedTemplate(this IPublishedContent content, int templateId)
|
||||
{
|
||||
if (content == null)
|
||||
return false;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().WebRouting.DisableAlternativeTemplates == true)
|
||||
return content.TemplateId == templateId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user