Fix parsing of bunker URI from standards-compliant runtimes

This commit is contained in:
Alex Gleason 2024-10-21 10:51:38 -05:00
parent 38be26a9e9
commit 67c1e7eba5
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ export const NostrBunkerLogin: React.FC = () => {
const url = new URL(uri); const url = new URL(uri);
const params = new URLSearchParams(url.search); const params = new URLSearchParams(url.search);
const pubkey = url.pathname.slice(2); // https://github.com/denoland/deno/issues/26440
const pubkey = url.hostname || url.pathname.slice(2);
const secret = params.get('secret'); const secret = params.get('secret');
const relays = params.getAll('relay'); const relays = params.getAll('relay');