diff --git a/server/utils/places.ts b/server/utils/places.ts index 9367fc9..e87918f 100644 --- a/server/utils/places.ts +++ b/server/utils/places.ts @@ -24,15 +24,16 @@ export async function geocodeAddress(address: string, apiKey: string): Promise !POST_FILTER_EXCLUDED_TYPES.includes(p.primaryType ?? '')) + // A missing primaryType means Google has no supported category for the place + // at all. In practice these are half-registered map entries ("kırmızı el + // arabası", a person's name on a doorway) — never something to sell to. + const filtered = (res.places ?? []) + .filter(p => p.primaryType) + .filter(p => !POST_FILTER_EXCLUDED_TYPES.includes(p.primaryType!)) return filtered.map((p) => { const reviews: ReviewSnippet[] = (p.reviews ?? [])