Skip to content

Commit

Permalink
fix(infobox): error in infobox links widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Oct 15, 2024
1 parent 5fa050a commit 1de3ea1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/widget/infobox/widget_infobox_links.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Links:render()

local index = 2
while linkInputs[key .. index] ~= nil do
table.insert(self:_makeLink(key, linkInputs[key .. index]))
table.insert(links, self:_makeLink(key, linkInputs[key .. index]))
-- Remove link from the collection
linkInputs[key .. index] = nil
index = index + 1
Expand All @@ -52,13 +52,13 @@ function Links:render()
end

for key, value in Table.iter.spairs(linkInputs) do
table.insert(self:_makeLink(key, value))
table.insert(links, self:_makeLink(key, value))
end

return HtmlWidgets.Div{children = HtmlWidgets.Div{
return HtmlWidgets.Div{children = {HtmlWidgets.Div{
classes = {'infobox-center', 'infobox-icons'},
children = Array.interleave(links, ' ')
}}
}}}
end

---@param key string
Expand Down

0 comments on commit 1de3ea1

Please sign in to comment.