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:
parent
346121b397
commit
31c96b0935
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue