File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
src/Components/Endpoints/src/Rendering Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -76,16 +76,13 @@ internal async Task InitializeStandardComponentServicesAsync(
7676 string ? handler = null ,
7777 IFormCollection ? form = null )
7878 {
79- var navigationManager = ( IHostEnvironmentNavigationManager ) httpContext . RequestServices . GetRequiredService < NavigationManager > ( ) ;
80- navigationManager ? . Initialize ( GetContextBaseUri ( httpContext . Request ) , GetFullUri ( httpContext . Request ) ) ;
79+ var navigationManager = httpContext . RequestServices . GetRequiredService < NavigationManager > ( ) ;
80+ ( ( IHostEnvironmentNavigationManager ) navigationManager ) ? . Initialize ( GetContextBaseUri ( httpContext . Request ) , GetFullUri ( httpContext . Request ) ) ;
8181
82- if ( navigationManager is HttpNavigationManager httpNavigationManager )
82+ navigationManager ? . NotFoundEvent + = ( sender , args ) =>
8383 {
84- httpNavigationManager . NotFoundEvent += ( sender , args ) =>
85- {
86- SetNotFoundResponse ( ) ;
87- } ;
88- }
84+ SetNotFoundResponse ( ) ;
85+ } ;
8986
9087 var authenticationStateProvider = httpContext . RequestServices . GetService < AuthenticationStateProvider > ( ) ;
9188 if ( authenticationStateProvider is IHostEnvironmentAuthenticationStateProvider hostEnvironmentAuthenticationStateProvider )
You can’t perform that action at this time.
0 commit comments