Skip to content

Commit a01bca6

Browse files
authored
Fix duplicated inputs on loading nested subgraphs (#1192)
1 parent 0207794 commit a01bca6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/subgraph/SubgraphNode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
6060
subgraphEvents.addEventListener("input-added", (e) => {
6161
const subgraphInput = e.detail.input
6262
const { name, type } = subgraphInput
63+
if (this.inputs.some(i => i.name == name))
64+
return
6365
const input = this.addInput(name, type)
6466

6567
this.#addSubgraphInputListeners(subgraphInput, input)

0 commit comments

Comments
 (0)