From a395bf7f9907ed28af89ef6c6aaf3b78376f03cc Mon Sep 17 00:00:00 2001 From: myxmaster Date: Wed, 27 Nov 2024 18:22:35 +0100 Subject: [PATCH] better htlc array check for keysend message --- models/Invoice.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/Invoice.ts b/models/Invoice.ts index 3cf45cb76..6b8de3211 100644 --- a/models/Invoice.ts +++ b/models/Invoice.ts @@ -264,8 +264,7 @@ export default class Invoice extends BaseModel { @computed public get getKeysendMessage(): string { if ( - this.htlcs && - this.htlcs[0] && + this.htlcs?.length > 0 && this.htlcs[0].custom_records && this.htlcs[0].custom_records[keySendMessageType] ) {