Skip to content

Commit 3b2a2c3

Browse files
tidy
1 parent c61bf36 commit 3b2a2c3

File tree

1 file changed

+2
-2
lines changed
  • packages/did/src/methods

1 file changed

+2
-2
lines changed

packages/did/src/methods/web.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ export function didWebToUrl(did: string) {
5454
try {
5555
const url = new URL(
5656
`https://${host.replaceAll('%3A', ':')}${path.replaceAll(':', '/')}`,
57-
)
57+
) as URL & { protocol: 'http:' | 'https:' }
5858
if (url.hostname === 'localhost') {
5959
url.protocol = 'http:'
6060
}
61-
return url as URL & { protocol: 'http:' | 'https:' }
61+
return url
6262
} catch (cause) {
6363
throw new InvalidDidError(did, 'Invalid Web DID', cause)
6464
}

0 commit comments

Comments
 (0)