mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 23:50:00 +00:00
[fix] Allow creating connections from empty subgraph slots (#1167)
This commit is contained in:
@@ -6026,7 +6026,11 @@ export class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap>
|
||||
}
|
||||
const { name } = slotX
|
||||
iSlotConn = nodeX.slots.findIndex(s => s.name === name)
|
||||
slotX = nodeX.slots[iSlotConn]
|
||||
// If it's not found in the main slots, it might be the empty slot from a Subgraph node.
|
||||
// In that case, the original `slotX` object is the correct one, so don't overwrite it.
|
||||
if (iSlotConn !== -1) {
|
||||
slotX = nodeX.slots[iSlotConn]
|
||||
}
|
||||
if (!slotX) {
|
||||
console.warn("Cant get slot information", slotX)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user