From 0f2af47087f805cf394a47124f96058c3003a7a3 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 15 Jan 2025 19:10:48 +0100 Subject: [PATCH] fix(profile): check for empty strings for ln Closes #183 --- src/components/ProfileSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ProfileSection.tsx b/src/components/ProfileSection.tsx index d6f8a4f..b8f0092 100644 --- a/src/components/ProfileSection.tsx +++ b/src/components/ProfileSection.tsx @@ -155,7 +155,7 @@ export const Profile = ({ pubkey }: ProfileProps) => {

{displayName}

{/* Nip05 can sometimes be an empty object '{}' which causes the error */} - {typeof nip05 === 'string' && ( + {typeof nip05 === 'string' && nip05 !== '' && (

{nip05}

)}
@@ -191,7 +191,7 @@ export const Profile = ({ pubkey }: ProfileProps) => { {typeof nprofile !== 'undefined' && ( )} - {typeof lud16 !== 'undefined' && ( + {typeof lud16 !== 'undefined' && lud16 !== '' && ( )} -- 2.34.1