File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
src/lib/litegraph/src/subgraph Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,12 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
171171 subgraphInput : SubgraphInput ,
172172 input : INodeInputSlot & Partial < ISubgraphInput >
173173 ) {
174- input . _listenerController ?. abort ( )
174+ if (
175+ input . _listenerController &&
176+ typeof input . _listenerController . abort === 'function'
177+ ) {
178+ input . _listenerController . abort ( )
179+ }
175180 input . _listenerController = new AbortController ( )
176181 const { signal } = input . _listenerController
177182
@@ -207,7 +212,12 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
207212
208213 override configure ( info : ExportedSubgraphInstance ) : void {
209214 for ( const input of this . inputs ) {
210- input . _listenerController ?. abort ( )
215+ if (
216+ input . _listenerController &&
217+ typeof input . _listenerController . abort === 'function'
218+ ) {
219+ input . _listenerController . abort ( )
220+ }
211221 }
212222
213223 this . inputs . length = 0
@@ -518,7 +528,12 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
518528 }
519529
520530 for ( const input of this . inputs ) {
521- input . _listenerController ?. abort ( )
531+ if (
532+ input . _listenerController &&
533+ typeof input . _listenerController . abort === 'function'
534+ ) {
535+ input . _listenerController . abort ( )
536+ }
522537 }
523538 }
524539}
You can’t perform that action at this time.
0 commit comments