Skip to content

Commit

Permalink
ensure pagename is with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Jan 17, 2025
1 parent fc60481 commit f7e1afe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/standings/commons/standings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ local Standings = {}
---@param standingsIndex integer #0-index'd on per page
---@return StandingsModel?
function Standings.getStandingsTable(pagename, standingsIndex)
local pageNameInCorrectFormat = string.gsub(pagename, ' ', '_')
local record = mw.ext.LiquipediaDB.lpdb('standingstable', {
conditions = '[[pagename::' .. pagename .. ']] AND [[standingsindex::' .. standingsIndex .. ']]',
conditions = '[[pagename::' .. pageNameInCorrectFormat .. ']] AND [[standingsindex::' .. standingsIndex .. ']]',
limit = 1,
})[1]
if not record then
Expand Down

0 comments on commit f7e1afe

Please sign in to comment.