Skip to content

Commit

Permalink
fix(match2): display on bracket template pages still off
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha committed Oct 18, 2024
1 parent da33ad0 commit b5304f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/match2/commons/bracket_template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ end
---@param props {bracketId: string, config: table?}
---@return Html
function BracketTemplate.BracketContainer(props)
local bracket = MatchGroupUtil.fetchMatchGroup(props.bracketId) --[[@as MatchGroupUtilBracket]]
Array.forEach(bracket.matches or {}, function(match)
match.opponents = {Opponent.blank()}
local matchRecords = MatchGroupUtil.fetchMatchRecords(props.bracketId)
Array.forEach(matchRecords, function(match)
match.match2opponents = {{type = Opponent.literal, name = '', match2players = {}}}
end)
local bracket = MatchGroupUtil.makeMatchGroup(matchRecords) --[[@as MatchGroupUtilBracket]]

return BracketDisplay.Bracket({
bracket = bracket,
config = Table.merge(props.config, {
Expand Down

0 comments on commit b5304f8

Please sign in to comment.