From e40911e833806ad9288feb8c52fc1794e5c23b8f Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 7 Apr 2021 13:39:36 +0200 Subject: [PATCH] 2815 - Fix ticket without state --- modules/ticket/front/sale/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 2f3a65812..46cbe43c9 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -27,9 +27,12 @@ class Controller extends Section { } get ticketState() { - if (!this.ticket) return null; + const ticket = this.ticket; + if (!ticket) return null; - return this.ticket.ticketState.state.code; + const ticketState = ticket.ticketState; + + return ticketState && ticketState.state.code; } getSaleTotal(sale) {