Merge pull request #4534 from aaronpowell/temp8-3935-clientdependency

Removing ClientDependency setup for non-web runtimes
This commit is contained in:
Shannon Deminick
2019-02-14 14:04:27 +11:00
committed by GitHub

View File

@@ -278,7 +278,10 @@ namespace Umbraco.Web.Runtime
{ "compositeFileHandlerPath", ClientDependencySettings.Instance.CompositeFileHandlerPath }
});
ClientDependencySettings.Instance.MvcRendererCollection.Add(renderer);
// When using a non-web runtime and this component is loaded ClientDependency explodes because it'll
// want to access HttpContext.Current, which doesn't exist
if (IOHelper.IsHosted)
ClientDependencySettings.Instance.MvcRendererCollection.Add(renderer);
}
}
}