Catch error for zap splits
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Kieran 2023-09-13 12:18:13 +01:00
parent 7b7a6c7800
commit 84f6e810b0
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -110,7 +110,11 @@ export default function NoteFooter(props: NoteFooterProps) {
function getTargetName() {
const zapTarget = ev.tags.find(a => a[0] === "zap")?.[1];
if (zapTarget) {
return new LNURL(zapTarget).name;
try {
return new LNURL(zapTarget).name;
} catch {
// ignore
}
} else {
return author?.display_name || author?.name;
}