fix(reactflowUtils.ts): fix null pointer error when accessing nested properties in connectedInputNodesOnHandle function
This commit is contained in:
parent
5933c2cefc
commit
772bfbf1d3
1 changed files with 3 additions and 3 deletions
|
|
@ -668,13 +668,13 @@ export function connectedInputNodesOnHandle(
|
||||||
const sourceNode = nodes.find((n) => n.id === edge.source);
|
const sourceNode = nodes.find((n) => n.id === edge.source);
|
||||||
if (sourceNode) {
|
if (sourceNode) {
|
||||||
if (sourceNode.type === "groupNode") {
|
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") {
|
while (lastNode && lastNode.type === "groupNode") {
|
||||||
lastNode = findLastNode(lastNode.data.node.flow.data);
|
lastNode = findLastNode(lastNode.data.node!.flow!.data!);
|
||||||
}
|
}
|
||||||
if (lastNode) {
|
if (lastNode) {
|
||||||
connectedNodes.push({
|
connectedNodes.push({
|
||||||
name: sourceNode.data.node.flow.name,
|
name: sourceNode.data.node!.flow!.name,
|
||||||
id: lastNode.id,
|
id: lastNode.id,
|
||||||
isGroup: true,
|
isGroup: true,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue