Allow for unknown stops in side pane

This commit is contained in:
Mattéo Delabre 2020-07-27 23:48:10 +02:00
parent 0b8963af99
commit ca8d6f894f
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 3 additions and 1 deletions

View File

@ -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>