mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Fix empty input not used when connecting links (#24)
When dragging a link onto a node, it will always replace the first matching input type, unless you drop in the (respectively tiny) input hit box. This commit fixes that, honouring the intended behaviour (preferFreeSlot is true in internal calls).
This commit is contained in:
@@ -4059,7 +4059,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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user