File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,10 @@ export function migrateWidgetsValues<TWidgetValue>(
153153 * @param graph - The graph to fix links for.
154154 */
155155export function fixLinkInputSlots ( graph : LGraph ) {
156+ // Note: We can't use forEachNode here because we need access to the graph's
157+ // links map at each level. Links are stored in their respective graph/subgraph.
156158 for ( const node of graph . nodes ) {
159+ // Fix links for the current node
157160 for ( const [ inputIndex , input ] of node . inputs . entries ( ) ) {
158161 const linkId = input . link
159162 if ( ! linkId ) continue
@@ -163,6 +166,11 @@ export function fixLinkInputSlots(graph: LGraph) {
163166
164167 link . target_slot = inputIndex
165168 }
169+
170+ // Recursively fix links in subgraphs
171+ if ( node . isSubgraphNode ?.( ) && node . subgraph ) {
172+ fixLinkInputSlots ( node . subgraph )
173+ }
166174 }
167175}
168176
You can’t perform that action at this time.
0 commit comments