Skip to content

Commit

Permalink
Added extra check if pipeline has no jobs (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelvocks authored Sep 5, 2018
1 parent 664e220 commit 9622b72
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions frontend/client/views/pipeline/detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ export default {
jobs = pipeline.jobs
}
// check if this pipeline has jobs
if (!jobs) {
return
}
// Check if something has changed
if (this.nodes) {
var redraw = false
Expand Down Expand Up @@ -360,11 +365,13 @@ export default {
checkPipelineArgs () {
// check if this pipeline has args
for (let x = 0, y = this.pipeline.jobs.length; x < y; x++) {
if (this.pipeline.jobs[x].args && this.pipeline.jobs[x].args.type !== 'vault') {
// we found args. Redirect user to params view.
this.$router.push({path: '/pipeline/params', query: { pipelineid: this.pipeline.id }})
return
if (this.pipeline.jobs) {
for (let x = 0, y = this.pipeline.jobs.length; x < y; x++) {
if (this.pipeline.jobs[x].args && this.pipeline.jobs[x].args.type !== 'vault') {
// we found args. Redirect user to params view.
this.$router.push({path: '/pipeline/params', query: { pipelineid: this.pipeline.id }})
return
}
}
}
Expand Down

0 comments on commit 9622b72

Please sign in to comment.