fix(cache): skip non-table entries in get_contest_summaries

Problem: `set_contest_summaries` stores `supports_countdown` as a
boolean directly under the platform key. `get_contest_summaries`
only filtered keys starting with `_`, so it iterated the boolean
and crashed indexing it as a table.

Solution: add `type(contest_data) == 'table'` guard to the loop.
This commit is contained in:
Barrett Ruth 2026-03-06 19:53:38 -05:00
parent 425a8f36e9
commit c6a4c6ebc1
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -379,7 +379,7 @@ end
function M.get_contest_summaries(platform)
local contest_list = {}
for contest_id, contest_data in pairs(cache_data[platform] or {}) do
if contest_id:sub(1, 1) ~= '_' then
if type(contest_data) == 'table' and contest_id:sub(1, 1) ~= '_' then
table.insert(contest_list, {
id = contest_id,
name = contest_data.name,