From 9f70b56a3a3f7561d7ce928d2a701e4fc1c21d8c Mon Sep 17 00:00:00 2001 From: jubnl Date: Tue, 21 Apr 2026 14:21:11 +0200 Subject: [PATCH] fix: pass lat/lng/name to placePhoto in PDF thumbnail fetch Without these args, the Wikimedia fallback (used when no Google Maps key is configured) silently skips the fetch because lat/lng are NaN. The plan view (PlaceAvatar/photoService) already passes all three; this aligns the PDF path with the same behaviour. --- client/src/components/PDF/TripPDF.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/PDF/TripPDF.tsx b/client/src/components/PDF/TripPDF.tsx index 4657fbce..040bb711 100644 --- a/client/src/components/PDF/TripPDF.tsx +++ b/client/src/components/PDF/TripPDF.tsx @@ -101,7 +101,7 @@ async function fetchPlacePhotos(assignments) { await Promise.allSettled( toFetch.map(async (place) => { try { - const data = await mapsApi.placePhoto(place.google_place_id || place.osm_id) + const data = await mapsApi.placePhoto(place.google_place_id || place.osm_id, place.lat, place.lng, place.name) if (data.photoUrl) photoMap[place.id] = data.photoUrl } catch {} })