Skip to content

Commit 1fd0c17

Browse files
authored
Apply suggestion from @DrJKL
1 parent 88af3a1 commit 1fd0c17

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/litegraph/src/LGraphNode.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,9 +3068,11 @@ export class LGraphNode
30683068
graph instanceof Subgraph
30693069
) {
30703070
const targetSlot = graph.outputNode.slots[link_info.target_slot]
3071-
if (targetSlot) targetSlot.linkIds.length = 0
3072-
else
3071+
if (targetSlot) {
3072+
targetSlot.linkIds.length = 0
3073+
} else {
30733074
console.error('Missing subgraphOutput slot when disconnecting link')
3075+
}
30743076
}
30753077

30763078
const target = graph.getNodeById(link_info.target_id)

0 commit comments

Comments
 (0)