Skip to content

Commit

Permalink
fix bug in what was the previous and current stop
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Dec 6, 2024
1 parent 7d54dcf commit 97aead6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/SingleTripInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,16 @@
let temp_last_inactive_stop_idx = -1;
let i = 0;
console.log('stoptimes_cleaned_dataset', stoptimes_cleaned_dataset)
stoptimes_cleaned_dataset.forEach((stoptime: any) => {
if (stoptime.rt_departure_time != null) {
if (stoptime.rt_departure_time < current_time / 1000) {
temp_last_inactive_stop_idx = i;
}
} else {
if (stoptime.scheduled_departure_time_unix_seconds || stoptime.interpolated_stoptime_unix_seconds < current_time / 1000) {
if ((stoptime.scheduled_departure_time_unix_seconds || stoptime.interpolated_stoptime_unix_seconds) < current_time / 1000) {
temp_last_inactive_stop_idx = i;
} else {
if (stoptime.rt_arrival_time != null) {
Expand Down

0 comments on commit 97aead6

Please sign in to comment.