fix: hasGroupStage check for templates without groupStage property

undefined !== null is true, so templates that omit groupStage (like
nba_20) were incorrectly treated as group-stage templates, triggering
the generate-groups action and the "Invalid template or template has
no group stage" error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chris Parsons 2026-04-12 22:09:11 -07:00
parent 346121b397
commit 31c96b0935

View file

@ -67,7 +67,7 @@ export default function EventBracket({
const template = templates.find((t) => t.id === selectedTemplate);
// Determine if this is a group-stage event
const hasGroupStage = template?.groupStage !== null;
const hasGroupStage = template?.groupStage !== null && template?.groupStage !== undefined;
// Determine if this template uses named regions (e.g. NCAA 68)
const hasRegions = (template?.regions?.length ?? 0) > 0;