mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-19 14:15:21 +02: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();
|
||||
|
||||
if (settings.host) {
|
||||
const protocol = settings.https ? "https" : "http";
|
||||
return `${protocol}://${settings.host}`;
|
||||
if (settings?.host) {
|
||||
const protocol = settings?.https ? "https" : "http";
|
||||
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