fix: handle invalid client tag

This commit is contained in:
2025-04-30 12:22:18 +01:00
parent 992d7f19be
commit 3d778f7ec7
2 changed files with 15 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
export function ClientTag({ ev }: { ev: TaggedNostrEvent }) {
const tag = ev.tags.find(a => a[0] === "client");
if (!tag) return;
const link = tag[2] && tag[2].includes(":") ? NostrLink.fromTag(["a", tag[2]]) : undefined;
const link = tag[2] && tag[2].includes(":") ? NostrLink.tryFromTag(["a", tag[2]]) : undefined;
return (
<span className="text-xs text-gray-light">
{" "}