diff --git a/src/components/ZapButton.tsx b/src/components/ZapButton.tsx index d140f3d..1e498c5 100644 --- a/src/components/ZapButton.tsx +++ b/src/components/ZapButton.tsx @@ -31,7 +31,7 @@ export function ZapButton({ ); // Don't show zap button if user is not logged in, is the author, or author has no lightning address - if (!user || user.pubkey === target.pubkey || (!author?.metadata?.lud16 && !author?.metadata?.lud06)) { + if (!user || !target || user.pubkey === target.pubkey || (!author?.metadata?.lud16 && !author?.metadata?.lud06)) { return null; } diff --git a/src/components/ZapDialog.tsx b/src/components/ZapDialog.tsx index 8ef5261..ebc63aa 100644 --- a/src/components/ZapDialog.tsx +++ b/src/components/ZapDialog.tsx @@ -146,7 +146,7 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { {invoice ? ( -