Skip to content

Commit

Permalink
fix: fix check for localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
tomicvladan committed Sep 9, 2022
1 parent e67c0aa commit 554c9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/bzz-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export function subdomainToBzzResource(subdomain: string): string {
}

export function isLocalhost(url: string): boolean {
const urlObject = new URL(url)
const { host } = new URL(url)

return urlObject.host === 'localhost'
return host === 'localhost' || host.startsWith('localhost:')
}

export function createSubdomainUrl(beeApiUrl: string, subdomain: string): string {
Expand Down

0 comments on commit 554c9ff

Please sign in to comment.