File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -136,18 +136,18 @@ export class DAGBuilder {
136136 nodes : string [ ] | undefined ,
137137 type : 'Loop' | 'Parallel'
138138 ) : void {
139- if ( ! nodes || nodes . length === 0 ) {
140- throw new Error (
141- `${ type } has no blocks inside. Add at least one block to the ${ type . toLowerCase ( ) } .`
142- )
143- }
144-
145139 const sentinelStartId =
146140 type === 'Loop' ? buildSentinelStartId ( id ) : buildParallelSentinelStartId ( id )
147141 const sentinelStartNode = dag . nodes . get ( sentinelStartId )
148142
149143 if ( ! sentinelStartNode ) return
150144
145+ if ( ! nodes || nodes . length === 0 ) {
146+ throw new Error (
147+ `${ type } has no blocks inside. Add at least one block to the ${ type . toLowerCase ( ) } .`
148+ )
149+ }
150+
151151 const hasConnections = Array . from ( sentinelStartNode . outgoingEdges . values ( ) ) . some ( ( edge ) =>
152152 nodes . includes ( extractBaseBlockId ( edge . target ) )
153153 )
You can’t perform that action at this time.
0 commit comments