attemp at handling data not ready in state

This commit is contained in:
2026-07-06 20:47:52 +02:00
parent 9324a08cf9
commit 23c1186689
2 changed files with 7 additions and 6 deletions
+1 -2
View File
@@ -26,7 +26,7 @@ const center = new LngLat(5.735, 45.185);
const zoom = 12;
const store = useMresoStore();
await store.fetchData();
store.fetchData();
const shownClusters = ref<FeatureCollection<Point> | null>(null);
const { selectedRoutesId } = defineProps<{
@@ -49,7 +49,6 @@ watchEffect(async () => {
.filter((c) => c !== undefined),
};
const firstPoint = shownClusters.value.features[0];
console.log(firstPoint);
if (!firstPoint) {
return;
}