mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-23 07:26:30 +00:00
fix(mobile): hint the suggestion fallback the same way the search is hinted
When details fails to resolve a picked suggestion the sheet falls back to a text search (#1192). That call was the one search left in the sheet without a location hint, so the fallback could land on an identically named place in another country - exactly what the hint exists to prevent, on the path taken when the first hop already failed.
This commit is contained in:
@@ -213,7 +213,7 @@ export default function PlPlaceSearch({ planner, locationBias, onPick, onResolvi
|
||||
}
|
||||
if (!place) {
|
||||
const fullQuery = [suggestion.mainText, suggestion.secondaryText].filter(Boolean).join(', ')
|
||||
const search = await mapsApi.search(fullQuery, language)
|
||||
const search = await mapsApi.search(fullQuery, language, pointFromBox(locationBias))
|
||||
place = (search.places?.[0] as MapsPlace | undefined) ?? null
|
||||
}
|
||||
if (place) {
|
||||
|
||||
Reference in New Issue
Block a user