🐛 Error raised by frontend Map component if no stop found
This commit is contained in:
@@ -116,8 +116,10 @@ export const Map: ParentComponent<{}> = () => {
|
|||||||
const foundStopIds = new Set();
|
const foundStopIds = new Set();
|
||||||
for (const foundStop of stops) {
|
for (const foundStop of stops) {
|
||||||
foundStopIds.add(foundStop.id);
|
foundStopIds.add(foundStop.id);
|
||||||
|
if (foundStop.stops !== undefined) {
|
||||||
foundStop.stops.forEach(s => foundStopIds.add(s.id));
|
foundStop.stops.forEach(s => foundStopIds.add(s.id));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const [stopIdStr, feature] of Object.entries(displayedFeatures)) {
|
for (const [stopIdStr, feature] of Object.entries(displayedFeatures)) {
|
||||||
const stopId = parseInt(stopIdStr);
|
const stopId = parseInt(stopIdStr);
|
||||||
|
Reference in New Issue
Block a user