Skip to content

Commit

Permalink
fix: only add cancelled association stops to cancelled list, dedupe i…
Browse files Browse the repository at this point in the history
…t too
  • Loading branch information
davwheat committed Jul 9, 2024
1 parent 1b4e1a2 commit a6f5c25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/AmeyLiveTrainAnnouncements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ function getCancelledCallingPoints(
...a
.service!!.locations.filter(s => {
if (!s.crs) return false
if (s.isCancelled || s.isOperational || s.isPass) return false
if (!s.isCancelled || s.isOperational || s.isPass) return false
if (!stations.includes(s.crs)) return false
return true
})
.map(l => ({ crsCode: l.crs!! })),
)
})

return stops
return Array.from(new Set(stops))
})
.filter(Boolean) as CallingAtPoint[]

Expand Down

0 comments on commit a6f5c25

Please sign in to comment.