function getBaseUrl() { if (typeof window !== "undefined") return window.location.origin; if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; return `http://localhost:${process.env.PORT ?? 3000}`;}
function getBaseUrl() { if (typeof window !== "undefined") return window.location.origin; if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; return `http://localhost:${process.env.PORT ?? 3000}`;}
This function getting VERCEL_URL while it's not available when making the tRPC call. I know because it's actually not hitting the tRPC backend and failing before that.
What I don't understand is why is this not an issue for everyone?