Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.71k stars 237 forks source link

[Bug]: Click and release an output port triggers an error in the console. #279

Closed codemile closed 9 months ago

codemile commented 9 months ago

What happened?

Click an output port on a node, don't move the mouse and release the output without dragging it anywhere.

What was the expected functionality?

No errors should be raised when clicking output ports.

Describe your environment

Windows, Node 20.10.0,

Relevant log output

Uncaught TypeError: Cannot destructure property 'nodeId' of 'closestPortToDraggingWire' as it is undefined.
    at useDraggingWire.ts:72:23
    at Object.value (NodePorts.tsx:75:5)
    at useStableCallback.ts:32:61
    at onMouseUp (Port.tsx:108:29)
    at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
    at invokeGuardedCallback (react-dom.development.js:4277:31)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:25)
    at executeDispatch (react-dom.development.js:9041:3)
    at processDispatchQueueItemsInOrder (react-dom.development.js:9073:7)
(anonymous) @ useDraggingWire.ts:72
(anonymous) @ NodePorts.tsx:75
(anonymous) @ useStableCallback.ts:32
onMouseUp @ Port.tsx:108
callCallback2 @ react-dom.development.js:4164
invokeGuardedCallbackDev @ react-dom.development.js:4213
invokeGuardedCallback @ react-dom.development.js:4277
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291
executeDispatch @ react-dom.development.js:9041
processDispatchQueueItemsInOrder @ react-dom.development.js:9073
processDispatchQueue @ react-dom.development.js:9086
dispatchEventsForPlugins @ react-dom.development.js:9097
(anonymous) @ react-dom.development.js:9288
batchedUpdates$1 @ react-dom.development.js:26140
batchedUpdates @ react-dom.development.js:3991
dispatchEventForPluginEventSystem @ react-dom.development.js:9287
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465
dispatchEvent @ react-dom.development.js:6457
dispatchDiscreteEvent @ react-dom.development.js:6430
Show 15 more frames
Show less

Relevant screenshots

No response

Code of Conduct