From 4056b3a73971b77fdb5ec15cc335379fe598f3db Mon Sep 17 00:00:00 2001 From: Adrien Date: Sat, 9 Sep 2023 23:18:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Error=20raised=20by=20frontend?= =?UTF-8?q?=20Map=20component=20if=20no=20stop=20found?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/stopsSearchMenu/map.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/stopsSearchMenu/map.tsx b/frontend/src/stopsSearchMenu/map.tsx index e20b5cb..7293ef1 100644 --- a/frontend/src/stopsSearchMenu/map.tsx +++ b/frontend/src/stopsSearchMenu/map.tsx @@ -116,7 +116,9 @@ export const Map: ParentComponent<{}> = () => { const foundStopIds = new Set(); for (const foundStop of stops) { foundStopIds.add(foundStop.id); - foundStop.stops.forEach(s => foundStopIds.add(s.id)); + if (foundStop.stops !== undefined) { + foundStop.stops.forEach(s => foundStopIds.add(s.id)); + } } for (const [stopIdStr, feature] of Object.entries(displayedFeatures)) {