chore(subflows): log warning instead of throwing an error #4455
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user