Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/wikis/commons/MatchGroup/Legacy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ end
function MatchGroupLegacy._generateMatch(match)
local opponents = Array.mapIndexes(function(opponentIndex)
local opp = Table.extract(match, 'opponent' .. opponentIndex)
if Logic.isEmpty(opp) then return end
if opponentIndex > 2 and Logic.isEmpty(opp) then return end
return '|opponent' .. opponentIndex .. '=' .. MatchGroupLegacy._generateOpponent(opp)
end)

Expand All @@ -506,6 +506,7 @@ end
---@param opp table
---@return string
function MatchGroupLegacy._generateOpponent(opp)
if Logic.isEmpty(opp) then return '' end
local opponentType = Table.extract(opp, 'type')
local opponentTemplate = String.upperCaseFirst(opponentType) .. 'Opponent'

Expand Down
Loading