Fix train page: don't show error if no services are found

This commit is contained in:
Fred Boniface 2025-05-02 20:24:02 +01:00
parent 0011bdb751
commit ec413b6e5c

View File

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