Skip to content

Commit 009b3ff

Browse files
committed
Fix: Windows PE build on web
1 parent a2eae3d commit 009b3ff

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

WebRISCV/CircularIdGenerator.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace WebRISCV
1+
using System.Globalization;
2+
3+
namespace WebRISCV
24
{
35
public class CircularIdGenerator
46
{
@@ -13,7 +15,10 @@ public CircularIdGenerator(List<string> inputItems)
1315

1416
public string Current
1517
{
16-
get { return items[currentIndex]; }
18+
get {
19+
if (items.Count == 0) return string.Empty;
20+
return items[currentIndex];
21+
}
1722
}
1823

1924
public string GetNextId()

WebRISCV/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
builder.RootComponents.Add<App>("#app");
77
builder.RootComponents.Add<HeadOutlet>("head::after");
88

9-
builder.Services.AddScoped(sp => new { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
9+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
1010

1111
await builder.Build().RunAsync();

0 commit comments

Comments
 (0)