resolves remaining PR comments

This commit is contained in:
Shannon
2020-03-24 12:11:46 +11:00
parent 139cd3935f
commit 2f8a85abe5
3 changed files with 8 additions and 8 deletions

View File

@@ -18,10 +18,11 @@ namespace Umbraco.Web.BackOffice.AspNetCore
{
get
{
var httpContext = _httpContextAccessor?.HttpContext;
// If session isn't enabled this will throw an exception so we check
var sessionFeature = _httpContextAccessor?.HttpContext?.Features.Get<ISessionFeature>();
var sessionFeature = httpContext?.Features.Get<ISessionFeature>();
return sessionFeature != null
? _httpContextAccessor?.HttpContext?.Session?.Id
? httpContext?.Session?.Id
: "0";
}
}