🐛 fix(utils.ts): add optional chaining to reactFlowInstance.getNode() to handle cases where reactFlowInstance is null or undefined
This commit is contained in:
parent
6b3fcd5608
commit
5d42acf28d
1 changed files with 1 additions and 1 deletions
|
|
@ -598,7 +598,7 @@ export function isValidConnection(
|
|||
) ||
|
||||
targetHandle.split("|")[0] === "str"
|
||||
) {
|
||||
let targetNode = reactFlowInstance.getNode(target).data.node;
|
||||
let targetNode = reactFlowInstance?.getNode(target)?.data?.node;
|
||||
if (!targetNode) {
|
||||
if (
|
||||
!reactFlowInstance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue