Skip to content

Commit

Permalink
catch non strings for string match (#3797)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha authored Jan 15, 2024
1 parent 7c5863e commit 5f731dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/infobox/commons/infobox_league.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function League:createInfobox()
Title{name = 'Chronology'},
Chronology{
content = Table.filterByKey(args, function(key)
return key:match('^previous%d?$') ~= nil or key:match('^next%d?$') ~= nil
return type(key) == 'string' and (key:match('^previous%d?$') ~= nil or key:match('^next%d?$') ~= nil)
end)
}
}
Expand Down

0 comments on commit 5f731dd

Please sign in to comment.