fixed an Error in RaidLogs.razor without parameter

This commit is contained in:
Sarah Faey 2022-12-04 11:12:44 +01:00
parent b3af92684c
commit 9c6386e137

View file

@ -53,6 +53,10 @@
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
if(string.IsNullOrEmpty(_selectedLogFolder))
{
_selectedLogFolder = "Training";
}
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
ulong discordId = ulong.Parse(authState.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value); ulong discordId = ulong.Parse(authState.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value);
_user = UserService.GetLiebUser(discordId); _user = UserService.GetLiebUser(discordId);