fix: invoice can have undefined tag

This commit is contained in:
Vlad Stan 2023-03-17 15:24:17 +02:00
parent 527afa0c8c
commit 28c0947afb

View file

@ -251,7 +251,7 @@
)
this.invoice = data.invoice
const paymentHashTag = decode(data.invoice).data.tags.find(
t => t.description === 'payment_hash'
t => t && t.description === 'payment_hash'
)
if (paymentHashTag) {
await this.waitForPaidInvoice(paymentHashTag.value)