File tree 1 file changed +3
-3
lines changed
src/Umbraco.Web.Common/AspNetCore
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public AspNetCoreRequestAccessor(
34
34
public string ? GetRequestValue ( string name ) => GetFormValue ( name ) ?? GetQueryStringValue ( name ) ;
35
35
36
36
/// <inheritdoc />
37
- public string ? GetQueryStringValue ( string name ) => _httpContextAccessor . GetRequiredHttpContext ( ) . Request . Query [ name ] ;
37
+ public string ? GetQueryStringValue ( string name ) => _httpContextAccessor . HttpContext ? . Request . Query [ name ] ;
38
38
39
39
/// <inheritdoc />
40
40
public Uri ? GetRequestUrl ( ) => _httpContextAccessor . HttpContext != null
@@ -86,8 +86,8 @@ internal void EnsureApplicationUrl() =>
86
86
87
87
private string ? GetFormValue ( string name )
88
88
{
89
- HttpRequest request = _httpContextAccessor . GetRequiredHttpContext ( ) . Request ;
90
- if ( ! request . HasFormContentType )
89
+ HttpRequest ? request = _httpContextAccessor . HttpContext ? . Request ;
90
+ if ( request ? . HasFormContentType is not true )
91
91
{
92
92
return null ;
93
93
}
You can’t perform that action at this time.
0 commit comments