[backport 1.25] Fix disconnection from subgraph inputs (#4859)

Co-authored-by: AustinMroz <austin@comfy.org>
This commit is contained in:
Comfy Org PR Bot
2025-08-09 23:03:49 +08:00
committed by GitHub
parent 80d54eca2f
commit aa9b70656e
2 changed files with 9 additions and 1 deletions

View File

@@ -795,7 +795,10 @@ export class LinkConnector {
*/
disconnectLinks(): void {
for (const link of this.renderLinks) {
if (link instanceof MovingLinkBase) {
if (
link instanceof MovingLinkBase ||
link instanceof ToInputFromIoNodeLink
) {
link.disconnect()
}
}

View File

@@ -135,4 +135,9 @@ export class ToInputFromIoNodeLink implements RenderLink {
connectToRerouteOutput() {
throw new Error('ToInputRenderLink cannot connect to an output.')
}
disconnect(): boolean {
if (!this.existingLink) return false
this.existingLink.disconnect(this.network, 'input')
return true
}
}