File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
9595 }
9696
9797 #addSubgraphInputListeners( subgraphInput : SubgraphInput , input : INodeInputSlot & Partial < ISubgraphInput > ) {
98- input . _listenerController ?. abort ( )
98+ if ( input . _listenerController && typeof input . _listenerController . abort === "function" ) {
99+ input . _listenerController . abort ( )
100+ }
99101 input . _listenerController = new AbortController ( )
100102 const { signal } = input . _listenerController
101103
@@ -131,7 +133,9 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
131133
132134 override configure ( info : ExportedSubgraphInstance ) : void {
133135 for ( const input of this . inputs ) {
134- input . _listenerController ?. abort ( )
136+ if ( input . _listenerController && typeof input . _listenerController . abort === "function" ) {
137+ input . _listenerController . abort ( )
138+ }
135139 }
136140
137141 this . inputs . length = 0
@@ -309,7 +313,9 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
309313
310314 override onRemoved ( ) : void {
311315 for ( const input of this . inputs ) {
312- input . _listenerController ?. abort ( )
316+ if ( input . _listenerController && typeof input . _listenerController . abort === "function" ) {
317+ input . _listenerController . abort ( )
318+ }
313319 }
314320 }
315321}
You can’t perform that action at this time.
0 commit comments