From 70495c6a27d52ded084f371701d7647f4a8440c4 Mon Sep 17 00:00:00 2001 From: wvffle Date: Sun, 12 Jun 2022 10:36:08 +0000 Subject: [PATCH] Reset the defaultServerUrl to the value of env var or origin when it's null in settings.json --- front/src/store/instance.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/front/src/store/instance.ts b/front/src/store/instance.ts index f5227956b..87fe142a8 100644 --- a/front/src/store/instance.ts +++ b/front/src/store/instance.ts @@ -188,7 +188,11 @@ const store: Module = { if (!response) return for (const [key, value] of Object.entries(response.data as FrontendSettings)) { - if (key === 'defaultServerUrl' && !value) continue + if (key === 'defaultServerUrl' && !value) { + state.frontSettings.defaultServerUrl = instanceUrl + continue + } + state.frontSettings[key as keyof FrontendSettings] = value } }