Fix account URL lookup with @ in the URL

This commit is contained in:
Alex Gleason 2024-08-07 14:52:13 -05:00
parent 385127761d
commit 8f704e4ea2
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -38,7 +38,7 @@ function extractBech32(value: string): string | undefined {
// Extract from URL, eg `https://njump.me/npub1q3sle0kvfsehgsuexttt3ugjd8xdklxfwwkh559wxckmzddywnws6cd26p`. // Extract from URL, eg `https://njump.me/npub1q3sle0kvfsehgsuexttt3ugjd8xdklxfwwkh559wxckmzddywnws6cd26p`.
case 'http:': case 'http:':
case 'https:': case 'https:':
bech32 = uri.pathname.slice(1); bech32 = uri.pathname.replace(/^\/@?/, '');
break; break;
} }
} catch { } catch {