nationalExp -> nationalExpress

Probably overlooked at commit 567cc98409.
This commit is contained in:
Kristjan Esperanto 2021-10-29 18:21:00 +02:00 committed by Jannis R
parent 6941e7a4ad
commit c270eed998

View file

@ -34,7 +34,7 @@ const client = createClient(dbProfile, 'my-awesome-program')
// find any journey from Berlin Südkreuz to München Hbf
const [journey] = await client.journeys(berlinSüdkreuz, münchenHbf, {results: 1, stopovers: true})
// find the ICE leg
const leg = journey.legs.find(l => l.line.product === 'nationalExp')
const leg = journey.legs.find(l => l.line.product === 'nationalExpress')
// find the stopover at the stop you've just passed
const previousStopover = leg.stopovers.find(st => st.departure && new Date(st.departure) < Date.now())