Fix if httpContext is null we cannot wrap it

This commit is contained in:
Bjarke Berg
2020-02-10 15:05:35 +01:00
parent 3dcff69d34
commit 4b9d0941a4

View File

@@ -9,7 +9,8 @@ namespace Umbraco.Web
{
get
{
return new HttpContextWrapper(System.Web.HttpContext.Current);
var httpContext = System.Web.HttpContext.Current;
return httpContext is null ? null : new HttpContextWrapper(httpContext);
}
set
{