From ec413b6e5c6ef4befa84bce904fc5e27f22fb7b6 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Fri, 2 May 2025 20:24:02 +0100 Subject: [PATCH] Fix train page: don't show error if no services are found --- src/routes/train/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/train/+page.svelte b/src/routes/train/+page.svelte index cebd350..38e43b5 100644 --- a/src/routes/train/+page.svelte +++ b/src/routes/train/+page.svelte @@ -88,7 +88,7 @@ const url = `${getApiUrl()}/api/v2/timetable/train/${formattedDate}/${searchType}/${id}`; try { const res = await fetch(url, options); - if (res.status == 200) { + if (res.status < 300) { let services = await res.json(); if (!services.length) { error = true;