Reset the defaultServerUrl to the value of env var or origin when it's null in settings.json
This commit is contained in:
parent
c4dd04e0b8
commit
70495c6a27
|
@ -188,7 +188,11 @@ const store: Module<State, RootState> = {
|
||||||
if (!response) return
|
if (!response) return
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(response.data as FrontendSettings)) {
|
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
|
state.frontSettings[key as keyof FrontendSettings] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue