mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Handle json parse error when testing urls
This commit is contained in:
parent
c0fb9eca82
commit
85e05d595d
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue