From 4d45d2770f6b5f51265cde955dc1c1dad60d16f6 Mon Sep 17 00:00:00 2001 From: Norbert Szulc Date: Sun, 7 Jul 2024 19:28:51 +0200 Subject: [PATCH] fix: Allow migration with minimal config Config fails to load if no baseurl is set. This blocks migration:dev --- server/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/config.js b/server/config.js index ebc3d631..c070ca0c 100644 --- a/server/config.js +++ b/server/config.js @@ -39,7 +39,7 @@ let config = { const configContent = fs.readFileSync(config_path) config = Object.assign(config, JSON.parse(configContent)) config.status = 'CONFIGURED' - if (!config.hostname) { + if (!config.hostname && config.baseurl) { config.hostname = new URL.URL(config.baseurl).hostname } } else { @@ -50,4 +50,4 @@ let config = { } config.load() -module.exports = config \ No newline at end of file +module.exports = config