mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
fix: 修复流水线列表页报length错误的bug
This commit is contained in:
@@ -128,13 +128,15 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
}
|
||||
const pipeline = JSON.parse(item.content);
|
||||
let stepCount = 0;
|
||||
RunnableCollection.each(pipeline.stages, (runnable: any) => {
|
||||
stepCount++;
|
||||
});
|
||||
if(pipeline.stages){
|
||||
RunnableCollection.each(pipeline.stages, (runnable: any) => {
|
||||
stepCount++;
|
||||
});
|
||||
}
|
||||
// @ts-ignore
|
||||
item.stepCount = stepCount;
|
||||
// @ts-ignore
|
||||
item.triggerCount = pipeline.triggers.length;
|
||||
item.triggerCount = pipeline.triggers?.length;
|
||||
delete item.content;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user