Skip to content

Commit

Permalink
fix(match2): handle game links with interruptions (#5259)
Browse files Browse the repository at this point in the history
* fix(match2) Correct iteration for game links

* sorted order
  • Loading branch information
mbergen authored Jan 6, 2025
1 parent 0f0c2c2 commit 6a035c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/match2/commons/match_summary_base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ function Footer:addLinks(links)
if not currentLinkData then
mw.log('Unknown link: ' .. linkType)
elseif type(link) == 'table' then
Array.forEach(link, function(gameLink, gameIdx)
for gameIdx, gameLink in Table.iter.spairs(link) do
local newText = currentLinkData.text .. ' on Game ' .. gameIdx
self:addLink(gameLink, currentLinkData.icon, currentLinkData.iconDark, newText)
end)
end
else
self:addLink(link, currentLinkData.icon, currentLinkData.iconDark, currentLinkData.text)
end
Expand Down

0 comments on commit 6a035c2

Please sign in to comment.