Skip to content

Commit

Permalink
fix(match2): Don't try to build class icon if is empty on hearthstone (
Browse files Browse the repository at this point in the history
…#5172)

* Catch empty class

* check empty
  • Loading branch information
LuckeLucky authored Dec 6, 2024
1 parent fa6641c commit c1fc5dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/match2/wikis/hearthstone/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ end
---@return Html?
function CustomMatchSummary._displayOpponents(isTeamMatch, players, flip)
local playerDisplays = Array.map(players, function (player)
local char = HtmlWidgets.Div{
local char = Logic.isNotEmpty(player.class) and HtmlWidgets.Div{
classes = {'brkts-champion-icon'},
children = MatchSummaryWidgets.Character{
character = player.class,
showName = not isTeamMatch,
flipped = flip,
}
}
} or nil
return HtmlWidgets.Div{
css = {
display = 'flex',
Expand Down

0 comments on commit c1fc5dd

Please sign in to comment.