Merge pull request #909 from bluewave-labs/fix/base-url-logic

Correct base URL logic
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-10-06 20:07:45 -07:00
commit 1255e2c13d
1 file changed
+3 -1
+3 -1
View File
@@ -10,7 +10,9 @@ class NetworkService {
this.setBaseUrl(baseURL);
this.unsubscribe = store.subscribe(() => {
const state = store.getState();
if (BASE_URL === undefined && state.settings.apiBaseUrl) {
if (BASE_URL !== undefined) {
baseURL = BASE_URL;
} else if (state?.settings?.apiBaseUrl ?? null) {
baseURL = state.settings.apiBaseUrl;
} else {
baseURL = FALLBACK_BASE_URL;