Catch error for zap splits
This commit is contained in:
@ -110,7 +110,11 @@ export default function NoteFooter(props: NoteFooterProps) {
|
|||||||
function getTargetName() {
|
function getTargetName() {
|
||||||
const zapTarget = ev.tags.find(a => a[0] === "zap")?.[1];
|
const zapTarget = ev.tags.find(a => a[0] === "zap")?.[1];
|
||||||
if (zapTarget) {
|
if (zapTarget) {
|
||||||
return new LNURL(zapTarget).name;
|
try {
|
||||||
|
return new LNURL(zapTarget).name;
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return author?.display_name || author?.name;
|
return author?.display_name || author?.name;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user