Fix disconnection from subgraph inputs (#4800)

This commit is contained in:
AustinMroz
2025-08-09 02:45:52 -05:00
committed by GitHub
parent 10d80165c4
commit db452c1e63
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
}
}