File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
src/Components/Samples/BlazorUnitedApp Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 3333
3434 [SupplyParameterFromForm ] Customer ? Value { get ; set ; }
3535
36- protected override void OnInitialized () => throw new InvalidOperationException ( " Some error " );
36+ protected override void OnInitialized () => Value ??= new ( );
3737
3838 bool _submitted = false ;
3939 public void Submit () => _submitted = true ;
Original file line number Diff line number Diff line change 33
44using BlazorUnitedApp ;
55using BlazorUnitedApp . Data ;
6- using Microsoft . AspNetCore . Hosting . StaticWebAssets ;
76
87var builder = WebApplication . CreateBuilder ( args ) ;
9- // Enable this so that we can resolve static web assets in the Production environment
10- // without publishing the app.
11- // This is so that we can test the error page.
12- StaticWebAssetsLoader . UseStaticWebAssets ( builder . Environment , builder . Configuration ) ;
138
149// Add services to the container.
1510builder . Services . AddRazorComponents ( ) ;
2116// Configure the HTTP request pipeline.
2217if ( ! app . Environment . IsDevelopment ( ) )
2318{
24- app . UseExceptionHandler ( "/Error" , newScope : true ) ;
19+ app . UseExceptionHandler ( "/Error" ) ;
2520 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
2621 app . UseHsts ( ) ;
2722}
You can’t perform that action at this time.
0 commit comments