Fixes tests and adds a few

This commit is contained in:
Sebastiaan Janssen
2015-04-02 17:52:59 +02:00
parent fa053426c3
commit 5f175874b2

View File

@@ -21,7 +21,8 @@ namespace Umbraco.Web.Routing
/// <returns>A value indicating whether an Umbraco document was found and assigned.</returns>
public bool TryFindContent(PublishedContentRequest docRequest)
{
if (UmbracoContext.Current.InPreviewMode == false && UmbracoConfig.For.UmbracoSettings().WebRouting.DisableFindContentByIdPath)
if (UmbracoContext.Current != null && UmbracoContext.Current.InPreviewMode == false
&& UmbracoConfig.For.UmbracoSettings().WebRouting.DisableFindContentByIdPath)
return false;
IPublishedContent node = null;