chore(subflows): log warning instead of throwing an error #4455

This commit is contained in:
moklick
2024-07-18 13:35:45 +02:00
parent f032638de3
commit 02e55153e4
+5 -1
View File
@@ -104,8 +104,12 @@ function updateChildPosition<NodeType extends NodeBase>(
const parentId = node.parentId!;
const parentNode = nodeLookup.get(parentId);
if (!parentNode) {
throw new Error(`Parent node ${parentId} not found`);
console.warn(
`[React Flow]: Parent node ${parentId} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`
);
return;
}
// update the parentLookup