Skip to content

Commit

Permalink
fix(match2): display on bracket templates broken
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha committed Oct 18, 2024
1 parent 9567a20 commit 1f00d16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/match2/commons/bracket_template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local BracketDisplay = Lua.import('Module:MatchGroup/Display/Bracket')
local Match = Lua.import('Module:Match')
local MatchGroupCoordinates = Lua.import('Module:MatchGroup/Coordinates')
local MatchGroupUtil = Lua.import('Module:MatchGroup/Util')
local Opponent = Lua.import('Module:Opponent')

---@class BracketTemplateBracket
---@field bracketDatasById table<string,MatchGroupUtilBracketBracketData>
Expand Down Expand Up @@ -54,8 +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()}
end)
return BracketDisplay.Bracket({
bracket = MatchGroupUtil.fetchMatchGroup(props.bracketId) --[[@as MatchGroupUtilBracket]],
bracket = bracket,
config = Table.merge(props.config, {
OpponentEntry = function() return mw.html.create('div'):addClass('brkts-opponent-entry') end,
matchHasDetails = function() return false end,
Expand Down

0 comments on commit 1f00d16

Please sign in to comment.