summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-10-05 06:06:08 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-10-05 06:06:08 +0200
commit745b3708d3f5a43e09a70616c164de45adf49daa (patch)
tree83b5377c653d18728270e98fa2caeb7f83f2f3c1
parentf942a9d9f59db25563e5a1346e214b49d56eafe3 (diff)
frontend tvly_journey_progress: handle entry-only stops
-rw-r--r--public/static/js/travelynx-actions.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js
index 30f2439..437ad60 100644
--- a/public/static/js/travelynx-actions.js
+++ b/public/static/js/travelynx-actions.js
@@ -166,7 +166,11 @@ function tvly_journey_progress() {
break;
}
if ((rt_dep != 0) && (rt_dep - now > 0)) {
- $('.next-stop').html(stop_name + '<br/>' + hhmm(rt_arr) + ' → ' + hhmm(rt_dep) + odelay(sched_dep, rt_dep));
+ 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;
}
}