Skip to content

Commit

Permalink
feat(match2): do not display "1 pts" with mvps (#4895)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz authored Oct 17, 2024
1 parent 10c9056 commit 0a9096f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/widget/match/summary/widget_match_summary_mvp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function MatchSummaryMVP:render()
if self.props.players == nil or #self.props.players == 0 then
return nil
end
local points = tonumber(self.props.points)
local players = Array.map(self.props.players, function(player)
if type(player) == 'table' then
local link = Link{
Expand All @@ -47,7 +48,7 @@ function MatchSummaryMVP:render()
children = WidgetUtil.collect(
#players > 1 and 'MVPs: ' or 'MVP: ',
Array.interleave(players, ', '),
self.props.points and ' (' .. self.props.points .. ' pts)' or nil
points and points > 1 and ' (' .. points .. ' pts)' or nil
),
}},
}
Expand Down

0 comments on commit 0a9096f

Please sign in to comment.