diff --git a/src/Umbraco.Web/Mvc/RenderViewEngine.cs b/src/Umbraco.Web/Mvc/RenderViewEngine.cs
index 1e49314429..8acca46d13 100644
--- a/src/Umbraco.Web/Mvc/RenderViewEngine.cs
+++ b/src/Umbraco.Web/Mvc/RenderViewEngine.cs
@@ -92,25 +92,25 @@ namespace Umbraco.Web.Mvc
///
///
///
- private bool ShouldFindView(ControllerContext controllerContext, bool isPartial)
- {
- var umbracoToken = controllerContext.GetDataTokenInViewContextHierarchy("umbraco");
+ private bool ShouldFindView(ControllerContext controllerContext, bool isPartial)
+ {
+ var umbracoToken = controllerContext.GetDataTokenInViewContextHierarchy("umbraco");
- //first check if we're rendering a partial view for the back office, or surface controller, etc...
- //anything that is not IUmbracoRenderModel as this should only pertain to Umbraco views.
- if (isPartial && umbracoToken is RenderModel)
- {
- return true;
- }
+ //first check if we're rendering a partial view for the back office, or surface controller, etc...
+ //anything that is not IUmbracoRenderModel as this should only pertain to Umbraco views.
+ if (isPartial && ((umbracoToken is RenderModel) == false))
+ {
+ return true;
+ }
- //only find views if we're rendering the umbraco front end
+ //only find views if we're rendering the umbraco front end
if (umbracoToken is RenderModel)
- {
- return true;
- }
+ {
+ return true;
+ }
- return false;
- }
+ return false;
+ }
}
}
\ No newline at end of file