File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
apps/webapp/app/v3/services Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -134,11 +134,14 @@ export class ResumeAttemptService extends BaseService {
134134
135135 //find the best attempt for each batch item
136136 //it should be the most recent one in a final state
137- const finalAttempts = dependentBatchItems . map ( ( item ) => {
138- return item . taskRun . attempts
139- . filter ( ( a ) => FINAL_ATTEMPT_STATUSES . includes ( a . status ) )
140- . sort ( ( a , b ) => b . number - a . number ) [ 0 ] ;
141- } ) ;
137+ const finalAttempts = dependentBatchItems
138+ . map ( ( item ) => {
139+ return item . taskRun . attempts
140+ . filter ( ( a ) => FINAL_ATTEMPT_STATUSES . includes ( a . status ) )
141+ . sort ( ( a , b ) => b . number - a . number )
142+ . at ( 0 ) ;
143+ } )
144+ . filter ( Boolean ) ;
142145
143146 completedAttemptIds = finalAttempts . map ( ( a ) => a . id ) ;
144147
You can’t perform that action at this time.
0 commit comments