Skip to content

Commit

Permalink
test: not returning null when no bank invoice is available
Browse files Browse the repository at this point in the history
  • Loading branch information
iago1501 committed Jan 9, 2025
1 parent 8f14e24 commit bf0c965
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions react/BankInvoiceSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bf0c965

Please sign in to comment.