Reset the defaultServerUrl to the value of env var or origin when it's null in settings.json

This commit is contained in:
wvffle 2022-06-12 10:36:08 +00:00 committed by Georg Krause
parent c4dd04e0b8
commit 70495c6a27
1 changed files with 5 additions and 1 deletions

View File

@ -188,7 +188,11 @@ const store: Module<State, RootState> = {
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
}
}