prevented an error if resultant length is 0 #704

Merged
joan merged 2 commits from 3032-ticket_card_components_volume_error into dev 2021-07-28 09:07:29 +00:00
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;
});
}
}