mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-25 05:08:46 +00:00
fix(admin): add optional chaining to safely access settings properties
This commit is contained in:
@@ -110,9 +110,9 @@ export const getDokployUrl = async () => {
|
|||||||
}
|
}
|
||||||
const settings = await getWebServerSettings();
|
const settings = await getWebServerSettings();
|
||||||
|
|
||||||
if (settings.host) {
|
if (settings?.host) {
|
||||||
const protocol = settings.https ? "https" : "http";
|
const protocol = settings?.https ? "https" : "http";
|
||||||
return `${protocol}://${settings.host}`;
|
return `${protocol}://${settings?.host}`;
|
||||||
}
|
}
|
||||||
return `http://${settings.serverIp}:${process.env.PORT}`;
|
return `http://${settings?.serverIp}:${process.env.PORT}`;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user