Skip to content

Commit eb5d4de

Browse files
committed
fix node not saving
1 parent bf002c8 commit eb5d4de

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • packages/client/editor/src/components/react-flow/NodePicker

packages/client/editor/src/components/react-flow/NodePicker/NodeItem.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ export const NodeItem = ({
3939
</AccordionTrigger>
4040
{item?.subItems &&
4141
item.subItems.map((subItem: Partial<ItemType>) => {
42-
const sub = subItem?.subItems?.flatMap(subItem => subItem.type)
42+
const sub = subItem?.subItems?.flatMap(
43+
subItem => subItem.type
44+
) as string[]
4345
return (
4446
<AccordionContent
4547
key={subItem.title}
4648
onClick={e => {
4749
e.stopPropagation()
48-
handleClick({ item: sub })
50+
handleClick({ item: sub[0] })
4951
}}
5052
className={`py-2 pr-2 pl-6 border-b-0 border-t border-black hover:underline hover:bg-[#282d33] cursor-pointer`}
5153
>

0 commit comments

Comments
 (0)