Skip to content

Commit cfbd536

Browse files
authored
1 parent 1e71eae commit cfbd536

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/extensions/core/widgetInputs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,14 @@ export class PrimitiveNode extends LGraphNode {
168168

169169
#onFirstConnection(recreating?: boolean) {
170170
// First connection can fire before the graph is ready on initial load so random things can be missing
171-
if (!this.outputs[0].links) {
171+
if (!this.outputs[0].links || !this.graph) {
172172
this.onLastDisconnect()
173173
return
174174
}
175175
const linkId = this.outputs[0].links[0]
176-
// @ts-expect-error fixme ts strict error
177176
const link = this.graph.links[linkId]
178177
if (!link) return
179178

180-
// @ts-expect-error fixme ts strict error
181179
const theirNode = this.graph.getNodeById(link.target_id)
182180
if (!theirNode || !theirNode.inputs) return
183181

src/lib/litegraph/src/LGraph.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,6 +1566,8 @@ export class LGraph
15661566

15671567
const subgraph = this.createSubgraph(data)
15681568
subgraph.configure(data)
1569+
for (const node of subgraph.nodes) node.onGraphConfigured?.()
1570+
for (const node of subgraph.nodes) node.onAfterGraphConfigured?.()
15691571

15701572
// Position the subgraph input nodes
15711573
subgraph.inputNode.arrange()

0 commit comments

Comments
 (0)