Tester view of a coming-soon game drops the soon object so the Play button renders (showed [object Object])

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-07 17:30:57 -05:00
parent 8285e31fbd
commit 468def461c
+1 -1
View File
@@ -3410,7 +3410,7 @@ const server = http.createServer(async (req, res) => {
// testers (env GAMES_TESTERS, usernames or emails; Marty 2026-10-07) get the Play button on a coming-soon game before it opens
const tester = isGameTester(acct, s.email);
if (g.soon && day < g.soon.opens && !tester) { out.push(Object.assign({}, g, { live: false, preview: false, soon: g.soon.label, play: null })); continue; } // coming soon: shown to all, not playable
if (g.soon && day < g.soon.opens && tester) { out.push(Object.assign({}, g, { live: false, preview: true, previewNote: 'testing · ' + g.soon.label.toLowerCase() })); continue; }
if (g.soon && day < g.soon.opens && tester) { out.push(Object.assign({}, g, { live: false, preview: true, previewNote: 'testing · ' + g.soon.label.toLowerCase(), soon: null })); continue; } // soon cleared: the client prints a soon card's label where the Play button goes
const ss = seasonState(g.season, day, admin); if (ss === 'hidden') continue;
const seasonPreview = ss === 'preview';
const isLive = live.has(g.slug); if (!isLive && !admin && !tester) continue;