Browse Source

fix: add defensive access for childNodeIds in SplitGridNode

Guard against undefined childNodeIds with optional chaining to
prevent a runtime crash when the array hasn't been initialized yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 4 months ago
parent
commit
e082f7bf33
  1. 2
      src/components/nodes/SplitGridNode.tsx

2
src/components/nodes/SplitGridNode.tsx

@ -137,7 +137,7 @@ export function SplitGridNode({ id, data, selected }: NodeProps<SplitGridNodeTyp
<div className="flex items-center justify-between">
{nodeData.isConfigured ? (
<div className="text-[10px] text-neutral-500">
{nodeData.childNodeIds.length} generate sets created
{nodeData.childNodeIds?.length ?? 0} generate sets created
</div>
) : (
<div className="text-[10px] text-amber-400">

Loading…
Cancel
Save