Allow for unknown stops in side pane
This commit is contained in:
parent
0b8963af99
commit
ca8d6f894f
|
@ -29,7 +29,9 @@ setInterval(() => {
|
||||||
|
|
||||||
const timeToHTML = time => Math.ceil((time - Date.now()) / 1000);
|
const timeToHTML = time => Math.ceil((time - Date.now()) / 1000);
|
||||||
|
|
||||||
const stopToHTML = stopId => network.stops[stopId].properties.name;
|
const stopToHTML = stopId => stopId in network.stops ?
|
||||||
|
network.stops[stopId].properties.name :
|
||||||
|
'<em>Arrêt inconnu</em>';
|
||||||
|
|
||||||
const passingsToHTML = passings => passings.map(([stopId, time]) => `
|
const passingsToHTML = passings => passings.map(([stopId, time]) => `
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue