Skip to content

Commit 9fa5853

Browse files
committed
Init role in view to avoid NullReferenceException
Role object is null on page load and only gets updated asynchronously afterwards
1 parent ee18733 commit 9fa5853

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/IoTHub.Portal.Client/Pages/RBAC/RoleDetailPage.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
private bool canWrite;
2222

2323
[Parameter] public string RoleId { get; set; }
24-
private RoleDetailsModel Role;
24+
private RoleDetailsModel Role = new();
2525

2626
protected override async Task OnInitializedAsync()
2727
{

0 commit comments

Comments
 (0)