diff --git a/frontend/src/routes/clinics/+page.js b/frontend/src/routes/clinics/+page.js index e9455cc..389212b 100644 --- a/frontend/src/routes/clinics/+page.js +++ b/frontend/src/routes/clinics/+page.js @@ -2,8 +2,12 @@ export async function load({ params, fetch }) { let clinics = await (await fetch('/api/clinic/list')).json(); clinics.reduce((acc, item) => (acc[item.name] = item, acc), clinics); - let selection = await (await fetch('/api/config/user/clinics')).json(); - selection.forEach(x => clinics[x] ? clinics[x].active = true : false); + try { + let selection = await (await fetch('/api/config/user/clinics')).json(); + selection.forEach(x => clinics[x] ? clinics[x].active = true : false); + } catch(ex) { + console.error(ex, ex.stack); + } return { clinics };