diff --git a/frontend/src/components/canvas/nodes/GroupRectNode.tsx b/frontend/src/components/canvas/nodes/GroupRectNode.tsx index 581f391..cbb8a5b 100644 --- a/frontend/src/components/canvas/nodes/GroupRectNode.tsx +++ b/frontend/src/components/canvas/nodes/GroupRectNode.tsx @@ -55,7 +55,7 @@ export function GroupRectNode({ id, data, selected }: NodeProps>) const posStyle = POSITION_STYLES[textPos] // Count children for collapse badge - const childrenCount = nodes.filter((n) => n.parentId === id).length + const childrenCount = (nodes ?? []).filter((n) => n.parentId === id).length const outsideJustify = textPos.includes('right') ? 'flex-end' : (textPos.includes('center') || textPos === 'center') ? 'center'