File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/lib/litegraph/src/canvas Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,10 @@ export class LinkConnector {
640640
641641 if ( connectingTo === 'input' && ioNode instanceof SubgraphOutputNode ) {
642642 const output = ioNode . getSlotInPosition ( canvasX , canvasY )
643- if ( ! output ) throw new Error ( 'No output slot found for link.' )
643+ if ( ! output ) {
644+ this . dropOnNothing ( event )
645+ return
646+ }
644647
645648 // Track the actual slot to use for all connections
646649 let targetSlot = output
@@ -669,7 +672,10 @@ export class LinkConnector {
669672 ioNode instanceof SubgraphInputNode
670673 ) {
671674 const input = ioNode . getSlotInPosition ( canvasX , canvasY )
672- if ( ! input ) throw new Error ( 'No input slot found for link.' )
675+ if ( ! input ) {
676+ this . dropOnNothing ( event )
677+ return
678+ }
673679
674680 // Same logic for SubgraphInputNode if needed
675681 let targetSlot = input
You can’t perform that action at this time.
0 commit comments