We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c61bf36 commit 3b2a2c3Copy full SHA for 3b2a2c3
packages/did/src/methods/web.ts
@@ -54,11 +54,11 @@ export function didWebToUrl(did: string) {
54
try {
55
const url = new URL(
56
`https://${host.replaceAll('%3A', ':')}${path.replaceAll(':', '/')}`,
57
- )
+ ) as URL & { protocol: 'http:' | 'https:' }
58
if (url.hostname === 'localhost') {
59
url.protocol = 'http:'
60
}
61
- return url as URL & { protocol: 'http:' | 'https:' }
+ return url
62
} catch (cause) {
63
throw new InvalidDidError(did, 'Invalid Web DID', cause)
64
0 commit comments