From 6e67dd408e7957d16e076ad9297e936babc5563f Mon Sep 17 00:00:00 2001 From: carlosjr Date: Tue, 27 Jul 2021 16:17:47 +0200 Subject: [PATCH] prevented an error if resultant length is 0 --- modules/ticket/front/component/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ticket/front/component/index.js b/modules/ticket/front/component/index.js index 307f8af15..3f262f457 100644 --- a/modules/ticket/front/component/index.js +++ b/modules/ticket/front/component/index.js @@ -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; + }); } }