Fix: display activities map FAB even if they lack coordinates
This commit is contained in:
@ -152,8 +152,8 @@ async function fetchData(isBackground = false) {
|
|||||||
Promise.all([
|
Promise.all([
|
||||||
routeStore.loadRoutes(undefined, false, isBackground),
|
routeStore.loadRoutes(undefined, false, isBackground),
|
||||||
businessService.getAllBusinesses().then(b => {
|
businessService.getAllBusinesses().then(b => {
|
||||||
featuredActivities.value = b.filter(biz => biz.is_featured && biz.latitude && biz.longitude);
|
featuredActivities.value = b.filter(biz => biz.is_featured);
|
||||||
if (showPromos.value) updatePromoMarkers();
|
if (showPromos.value || featuredActivities.value.length > 0) updatePromoMarkers();
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ async function updatePromoMarkers() {
|
|||||||
promoMarkers.value.forEach(m => m.setMap(null));
|
promoMarkers.value.forEach(m => m.setMap(null));
|
||||||
const newMarkers: any[] = [];
|
const newMarkers: any[] = [];
|
||||||
|
|
||||||
const promosWithCoords = featuredActivities.value;
|
const promosWithCoords = featuredActivities.value.filter(promo => promo.latitude && promo.longitude);
|
||||||
|
|
||||||
promosWithCoords.forEach(promo => {
|
promosWithCoords.forEach(promo => {
|
||||||
const marker = addMarker(
|
const marker = addMarker(
|
||||||
|
|||||||
Reference in New Issue
Block a user