From 5afc10f7216b0d4d8c17660607141b80ccde97ae Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 2 Aug 2023 22:39:42 -0300 Subject: [PATCH] update validateNode function to use handle id as JSON --- src/frontend/src/utils/reactflowUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 2a264a8b9..7304fdb89 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -193,8 +193,9 @@ export function validateNode( .getEdges() .some( (e) => - e.targetHandle.split("|")[1] === t && - e.targetHandle.split("|")[2] === n.id + (JSON.parse(e.targetHandle) as targetHandleType).fieldName === + t && + (JSON.parse(e.targetHandle) as targetHandleType).id === n.id ) ? [ `${type} is missing ${