prevented an error if resultant length is 0
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-07-27 16:17:47 +02:00 committed by joan
parent 4f8e319b89
commit 6e67dd408e
1 changed files with 4 additions and 1 deletions

View File

@ -82,7 +82,10 @@ class Controller extends Section {
if (!this.ticket) return;
this.$http.get(`Tickets/${this.ticket.id}/getVolume`)
.then(res => this.ticketVolume = res.data[0].volume);
.then(res => {
if (res.data.length)
this.ticketVolume = res.data[0].volume;
});
}
}