fix: double slash on opening hub urls

This commit is contained in:
uinstinct 2025-07-16 18:04:59 +05:30
parent 9db50e0ac2
commit f2c0357b2f

View file

@ -359,7 +359,10 @@ export class Core {
on("controlPlane/openUrl", async (msg) => {
const env = await getControlPlaneEnv(this.ide.getIdeSettings());
let url = `${env.APP_URL}${msg.data.path}`;
const urlPath = msg.data.path.startsWith("/")
? msg.data.path.slice(1)
: msg.data.path;
let url = `${env.APP_URL}${urlPath}`;
if (msg.data.orgSlug) {
url += `?org=${msg.data.orgSlug}`;
}