File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
9595 }
9696
9797 #addSubgraphInputListeners( subgraphInput : SubgraphInput , input : INodeInputSlot & Partial < ISubgraphInput > ) {
98- if ( input . _listenerController && typeof input . _listenerController . abort === "function" ) {
99- input . _listenerController . abort ( )
100- }
98+ input . _listenerController ?. abort ( )
10199 input . _listenerController = new AbortController ( )
102100 const { signal } = input . _listenerController
103101
@@ -133,9 +131,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
133131
134132 override configure ( info : ExportedSubgraphInstance ) : void {
135133 for ( const input of this . inputs ) {
136- if ( input . _listenerController && typeof input . _listenerController . abort === "function" ) {
137- input . _listenerController . abort ( )
138- }
134+ input . _listenerController ?. abort ( )
139135 }
140136
141137 this . inputs . length = 0
@@ -313,9 +309,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
313309
314310 override onRemoved ( ) : void {
315311 for ( const input of this . inputs ) {
316- if ( input . _listenerController && typeof input . _listenerController . abort === "function" ) {
317- input . _listenerController . abort ( )
318- }
312+ input . _listenerController ?. abort ( )
319313 }
320314 }
321315}
You can’t perform that action at this time.
0 commit comments