frontend tvly_journey_progress: handle entry-only stops

This commit is contained in:
Birte Kristina Friesel 2023-10-05 06:06:08 +02:00
parent f942a9d9f5
commit 745b3708d3
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -166,7 +166,11 @@ function tvly_journey_progress() {
break;
}
if ((rt_dep != 0) && (rt_dep - now > 0)) {
if (rt_arr != 0) {
$('.next-stop').html(stop_name + '<br/>' + hhmm(rt_arr) + ' → ' + hhmm(rt_dep) + odelay(sched_dep, rt_dep));
} else {
$('.next-stop').html(stop_name + '<br/>' + hhmm(rt_dep) + odelay(sched_dep, rt_dep));
}
break;
}
}