Skip to content

Commit

Permalink
Fix compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
Expecho committed Dec 9, 2024
1 parent ee9fa9d commit 97c260b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/PolicyInitiativeBuilder/Components/Pages/Home.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public partial class Home(PolicyService policyService, NotificationService notif
private IEnumerable<Policy> policies = [];
private IList<Policy> selectedPolicies = [];
private string existingInitiative = string.Empty;
private bool busyInitializing = true;

[CascadingParameter]
protected Tenant Tenant { get; set; } = Tenant.Empty;
Expand Down Expand Up @@ -46,6 +47,8 @@ private static List<string> FindPolicies(List<string> bicep)

protected override async Task OnParametersSetAsync()
{
busyInitializing = true;

policies = [];
if (Tenant.IsEmpty)
{
Expand All @@ -67,6 +70,10 @@ protected override async Task OnParametersSetAsync()
{
notificationService.Notify(new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "An error occured", CloseOnClick = true, Duration = 5000 });
}
finally
{
busyInitializing = false;
}

await base.OnParametersSetAsync();
}
Expand Down

0 comments on commit 97c260b

Please sign in to comment.