From bf0c965a5fc496dd15394ed9b17c2d978ee1bdb2 Mon Sep 17 00:00:00 2001 From: Iago Espinoza Date: Thu, 9 Jan 2025 15:01:45 -0300 Subject: [PATCH] test: not returning null when no bank invoice is available --- react/BankInvoiceSection.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/react/BankInvoiceSection.tsx b/react/BankInvoiceSection.tsx index 3c9f9d46..36338604 100644 --- a/react/BankInvoiceSection.tsx +++ b/react/BankInvoiceSection.tsx @@ -33,9 +33,8 @@ const BankInvoiceSection: FC = () => { .flat() .find(({ paymentGroup, url }) => paymentGroup === 'bankInvoice' && !!url) - if (!bankInvoice) return null - - const { url, paymentSystemName, barCodeNumber } = bankInvoice + const { url, paymentSystemName, barCodeNumber } = + bankInvoice ?? paymentMethodsFromOrder[0] const isURLValid = url && !url.match(/(\*.\*.)+\*\w\*/g) if (!isURLValid && !barCodeNumber) {