mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 15:27:04 +08:00
Fix empty input not used when connecting links
When dragging a link onto a node, it will always replace the first matching input type, unless you hit the (respectively small) input hit box. This commit fixes that, honouring the intended behaviour (preferFreeSlot is true in internal calls).
This commit is contained in:
parent
95fa9545f1
commit
c108421634
@ -4063,7 +4063,7 @@
|
||||
if (aSource[sI]=="*") aSource[sI] = 0;
|
||||
if (aDest[sI]=="*") aDest[sI] = 0;
|
||||
if (aSource[sI] == aDest[dI]) {
|
||||
if (preferFreeSlot && aSlots[i].links && aSlots[i].links !== null) continue;
|
||||
if (preferFreeSlot && (aSlots[i].links && aSlots[i].links !== null) || (aSlots[i].link && aSlots[i].link !== null)) continue;
|
||||
return !returnObj ? i : aSlots[i];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user