Merge pull request #4702 from sbwalker/dev

add defensive logic if ModuleState is null  in ModuleMessage
This commit is contained in:
Shaun Walker 2024-10-02 16:53:46 -04:00 committed by GitHub
commit 290547e482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,13 +10,16 @@
{ {
<NavLink class="ms-2" href="@NavigateUrl("admin/log")">View Details</NavLink> <NavLink class="ms-2" href="@NavigateUrl("admin/log")">View Details</NavLink>
} }
@if (ModuleState.RenderMode == RenderModes.Static) @if (ModuleState != null)
{ {
<a href="@NavigationManager.Uri" class="btn-close" data-dismiss="alert" aria-label="close"></a> @if (ModuleState.RenderMode == RenderModes.Static)
} {
else <a href="@NavigationManager.Uri" class="btn-close" data-dismiss="alert" aria-label="close"></a>
{ }
<button type="button" class="btn-close" data-dismiss="alert" aria-label="close" @onclick="CloseMessage"></button> else
{
<button type="button" class="btn-close" data-dismiss="alert" aria-label="close" @onclick="CloseMessage"></button>
}
} }
</div> </div>
} }