diff --git a/src/components/ConnectionRequired.tsx b/src/components/ConnectionRequired.tsx index ca6c26b091..5d29088e8c 100644 --- a/src/components/ConnectionRequired.tsx +++ b/src/components/ConnectionRequired.tsx @@ -53,8 +53,12 @@ const ConnectionRequired: FunctionComponent = ({ return; case ConnectionState.ServerSelection: // Bounce to select server page - console.debug('[ConnectionRequired] redirecting to select server page'); - navigate(BounceRoutes.SelectServer); + if (location.pathname === BounceRoutes.SelectServer) { + setIsLoading(false); + } else { + console.debug('[ConnectionRequired] redirecting to select server page'); + navigate(BounceRoutes.SelectServer); + } return; case ConnectionState.ServerUpdateNeeded: // Show update needed message and bounce to select server page diff --git a/src/utils/dashboard.js b/src/utils/dashboard.js index 1815dae241..4cca230cc2 100644 --- a/src/utils/dashboard.js +++ b/src/utils/dashboard.js @@ -56,9 +56,16 @@ export async function serverAddress() { return; } + let config; + try { + config = await resp.json(); + } catch (err) { + return; + } + return { url, - config: await resp.json() + config }; }).catch(error => { console.error(error);