From 772bfbf1d366f5d0fc975488dd97df2b6b27cb99 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Sun, 10 Sep 2023 23:57:22 -0300 Subject: [PATCH] fix(reactflowUtils.ts): fix null pointer error when accessing nested properties in connectedInputNodesOnHandle function --- src/frontend/src/utils/reactflowUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 54d2e60fc..6d0931392 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -668,13 +668,13 @@ export function connectedInputNodesOnHandle( const sourceNode = nodes.find((n) => n.id === edge.source); if (sourceNode) { if (sourceNode.type === "groupNode") { - let lastNode = findLastNode(sourceNode.data.node.flow.data); + let lastNode = findLastNode(sourceNode.data.node!.flow!.data!); while (lastNode && lastNode.type === "groupNode") { - lastNode = findLastNode(lastNode.data.node.flow.data); + lastNode = findLastNode(lastNode.data.node!.flow!.data!); } if (lastNode) { connectedNodes.push({ - name: sourceNode.data.node.flow.name, + name: sourceNode.data.node!.flow!.name, id: lastNode.id, isGroup: true, });