Skip to content

Commit

Permalink
🐛 Fix missing steam profile data breaking search (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hona authored Jul 3, 2024
1 parent 712c711 commit e82af29
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@
@switch (context.Value)
{
case ServerPlayerModel player:
var steamProfile = _steamProfiles[SteamUtilities.ConvertToSteamId64(player.SteamId)];
<FluentPersona Image="@steamProfile.Avatars.SmallUrl" ImageSize="24px"/>
_ = _steamProfiles.TryGetValue(SteamUtilities.ConvertToSteamId64(player.SteamId), out var steamProfile);

if (steamProfile is not null)
{
<FluentPersona Image="@steamProfile.Avatars.SmallUrl" ImageSize="24px"/>
}

@player.Name
break;
Expand Down

0 comments on commit e82af29

Please sign in to comment.