1
0
Fork 0
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:
Bill Thornton 2023-10-20 16:45:45 -04:00 committed by GitHub
commit c928d64ea2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -53,8 +53,12 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
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

View file

@ -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);