Skip to content

Commit 14d6962

Browse files
committed
Revert sample changes
1 parent 7891300 commit 14d6962

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/Components/Samples/BlazorUnitedApp/Pages/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
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;

src/Components/Samples/BlazorUnitedApp/Program.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
33

44
using BlazorUnitedApp;
55
using BlazorUnitedApp.Data;
6-
using Microsoft.AspNetCore.Hosting.StaticWebAssets;
76

87
var 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.
1510
builder.Services.AddRazorComponents();
@@ -21,7 +16,7 @@
2116
// Configure the HTTP request pipeline.
2217
if (!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
}

0 commit comments

Comments
 (0)