Skip to content

Commit ec50cf0

Browse files
authored
fix: Support empty string VERCEL_URL (#9846)
* allow empty VERCEL_URL * fixes Vercel development env crashes startup #4363 * simplify, support blank string URL
1 parent 9724c20 commit ec50cf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/next-auth/src/lib/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function parseUrl(url?: string): {
218218
url = `https://${url}`
219219
}
220220

221-
const _url = new URL(url ?? defaultUrl)
221+
const _url = new URL(url || defaultUrl)
222222
const path = (_url.pathname === "/" ? defaultUrl.pathname : _url.pathname)
223223
// Remove trailing slash
224224
.replace(/\/$/, "")

0 commit comments

Comments
 (0)