From ec852b898cad6c189dfd1f5a18c7350e71d77200 Mon Sep 17 00:00:00 2001 From: vicent Date: Tue, 21 Jun 2022 12:44:19 +0200 Subject: [PATCH] fix: check if services exists --- modules/ticket/back/methods/sale/refund.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index 8cdb28b24..703fb4ba7 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -56,7 +56,7 @@ module.exports = Self => { salesIds.push(null); const servicesIds = []; - if (services.length) { + if (services && services.length) { for (let service of services) servicesIds.push(service.id); } else