diff --git a/templates/nostrrelay/public.html b/templates/nostrrelay/public.html
index 9d4a9a0..53eed80 100644
--- a/templates/nostrrelay/public.html
+++ b/templates/nostrrelay/public.html
@@ -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)