From 1cc282a5fc23f7534ee3358c9d97717a76901d24 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 15 Aug 2023 07:53:14 +0200 Subject: [PATCH] :bug: (editor) Fix edges connection issue when item.blockId does not match --- .../features/graph/components/endpoints/SourceEndpoint.tsx | 3 ++- .../src/features/graph/components/nodes/item/ItemNode.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/builder/src/features/graph/components/endpoints/SourceEndpoint.tsx b/apps/builder/src/features/graph/components/endpoints/SourceEndpoint.tsx index 2b7fb32a2..e3aea7ee1 100644 --- a/apps/builder/src/features/graph/components/endpoints/SourceEndpoint.tsx +++ b/apps/builder/src/features/graph/components/endpoints/SourceEndpoint.tsx @@ -141,7 +141,8 @@ export const SourceEndpoint = ({ borderWidth="3.5px" shadow={`sm`} borderColor={ - previewingEdge?.from.blockId === source.blockId && + previewingEdge && + previewingEdge.from.blockId === source.blockId && previewingEdge.from.itemId === source.itemId ? connectedColor : color diff --git a/apps/builder/src/features/graph/components/nodes/item/ItemNode.tsx b/apps/builder/src/features/graph/components/nodes/item/ItemNode.tsx index c80cdb8ac..42022a662 100644 --- a/apps/builder/src/features/graph/components/nodes/item/ItemNode.tsx +++ b/apps/builder/src/features/graph/components/nodes/item/ItemNode.tsx @@ -116,7 +116,10 @@ export const ItemNode = ({