Guard against missing manual actions / scheduled jobs in pipelines row

This commit is contained in:
Winnie Hellmann 2018-10-04 09:49:30 +02:00
parent c02178b105
commit 9d3142425f
1 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,14 @@ export default {
},
computed: {
actions() {
return [...this.pipeline.details.manual_actions, ...this.pipeline.details.scheduled_actions];
if (!this.pipeline || !this.pipeline.details) {
return [];
}
const { details: pipelineDetails } = this.pipeline;
return [
...(pipelineDetails.manual_actions || []),
...(pipelineDetails.scheduled_actions || []),
];
},
/**
* If provided, returns the commit tag.