diff --git a/web/src/routes/timeline/Note.svelte b/web/src/routes/timeline/Note.svelte index 974b10bf5..e7d61c887 100644 --- a/web/src/routes/timeline/Note.svelte +++ b/web/src/routes/timeline/Note.svelte @@ -301,7 +301,13 @@ if (displayName !== undefined && displayName !== '') { return displayName; } - return nip19.npubEncode(pubkey).substring(0, 'npub1'.length + 7); + + try { + return nip19.npubEncode(pubkey).substring(0, 'npub1'.length + 7); + } catch (error) { + console.error('[npub encode error]', pubkey); + return '-'; + } }) .join(' @')}