mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4898 from thornbill/handle-json-parse
This commit is contained in:
commit
c928d64ea2
2 changed files with 14 additions and 3 deletions
|
@ -53,8 +53,12 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
||||||
return;
|
return;
|
||||||
case ConnectionState.ServerSelection:
|
case ConnectionState.ServerSelection:
|
||||||
// Bounce to select server page
|
// Bounce to select server page
|
||||||
|
if (location.pathname === BounceRoutes.SelectServer) {
|
||||||
|
setIsLoading(false);
|
||||||
|
} else {
|
||||||
console.debug('[ConnectionRequired] redirecting to select server page');
|
console.debug('[ConnectionRequired] redirecting to select server page');
|
||||||
navigate(BounceRoutes.SelectServer);
|
navigate(BounceRoutes.SelectServer);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
case ConnectionState.ServerUpdateNeeded:
|
case ConnectionState.ServerUpdateNeeded:
|
||||||
// Show update needed message and bounce to select server page
|
// Show update needed message and bounce to select server page
|
||||||
|
|
|
@ -56,9 +56,16 @@ export async function serverAddress() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let config;
|
||||||
|
try {
|
||||||
|
config = await resp.json();
|
||||||
|
} catch (err) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url,
|
url,
|
||||||
config: await resp.json()
|
config
|
||||||
};
|
};
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue