fix: prevent fetching clusters when no route is selected
This commit is contained in:
@@ -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`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user