Skip to content

Commit

Permalink
Merge pull request #281 from codemile/fix/click-output-error
Browse files Browse the repository at this point in the history
fix: a deconstruct error when drag end has no closest port
  • Loading branch information
abrenneke authored Dec 21, 2023
2 parents ccfcb6b + 46174d9 commit 64e1556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app/src/hooks/useDraggingWire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const useDraggingWire = (onConnectionsChanged: (connections: NodeConnecti
return;
}

const { nodeId: endNodeId, portId: endPortId } = closestPortToDraggingWire!;
const { nodeId: endNodeId, portId: endPortId } = closestPortToDraggingWire ?? {};

if (!endNodeId || !endPortId) {
return;
Expand Down

0 comments on commit 64e1556

Please sign in to comment.