Fix potential NullReferenceException
This commit is contained in:
committed by
Emma L Garland
parent
5c514ca6c6
commit
53b152d501
@@ -27,7 +27,7 @@ internal class AspNetCoreSessionManager : ISessionIdResolver, ISessionManager
|
||||
/// <summary>
|
||||
/// If session isn't enabled this will throw an exception so we check
|
||||
/// </summary>
|
||||
private bool IsSessionsAvailable => !(_httpContextAccessor.HttpContext?.Features.Get<ISessionFeature>() is null);
|
||||
private bool IsSessionsAvailable => !(_httpContextAccessor.HttpContext?.Features.Get<ISessionFeature>()?.Session is null);
|
||||
|
||||
public string? GetSessionValue(string key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user