Fix page crash after adding new server

dhcp-server
Pat Hartl 2023-08-30 19:46:05 -05:00
parent eb07d33ed5
commit c248ecc4f8
1 changed files with 5 additions and 2 deletions

View File

@ -23,9 +23,12 @@
<MenuItem Key="Console" RouterLink="@($"/Servers/{Server.Id}/Monitor/Console")">Console</MenuItem> <MenuItem Key="Console" RouterLink="@($"/Servers/{Server.Id}/Monitor/Console")">Console</MenuItem>
} }
@foreach (var log in Server.ServerConsoles) @if (Server.ServerConsoles != null)
{ {
<MenuItem Key="@log.Id.ToString()" RouterLink="@($"/Servers/{Server.Id}/Monitor/{log.Id}")">@log.Name</MenuItem> foreach (var log in Server.ServerConsoles)
{
<MenuItem Key="@log.Id.ToString()" RouterLink="@($"/Servers/{Server.Id}/Monitor/{log.Id}")">@log.Name</MenuItem>
}
} }
</SubMenu> </SubMenu>
<MenuItem RouterLink="@($"/Servers/{Server.Id}/Files")">Files</MenuItem> <MenuItem RouterLink="@($"/Servers/{Server.Id}/Files")">Files</MenuItem>