diff --git a/packages/app/src/hooks/useDraggingWire.ts b/packages/app/src/hooks/useDraggingWire.ts index fd5a619ed..463a52801 100644 --- a/packages/app/src/hooks/useDraggingWire.ts +++ b/packages/app/src/hooks/useDraggingWire.ts @@ -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;