fix: prevent fetching clusters when no route is selected

This commit is contained in:
Nathan Tien You
2026-07-08 08:54:04 +02:00
parent d8e9db3c59
commit 0ec0f681b2
3 changed files with 23 additions and 24 deletions
+3
View File
@@ -36,6 +36,9 @@ const map = useMap("main");
watchEffect(async () => {
const allClusters = [];
for (const routeId of store.selectedRouteIds) {
if (routeId === undefined) {
continue;
}
const apiClusters = await $fetch<Cluster[]>(
`https://data.mobilites-m.fr/api/routers/default/index/routes/${routeId}/clusters`,
);