Skip to content

Commit

Permalink
Merge pull request #32708 from tienifr/fix/30298
Browse files Browse the repository at this point in the history
Fix: Inconsistency between autocomplete address and displayed address
  • Loading branch information
amyevans authored Jan 2, 2024
2 parents 8cffccb + de79037 commit a2fc252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function AddressSearch({
// amount of data massaging needs to happen for what the parent expects to get from this function.
if (_.size(details)) {
onPress({
address: lodashGet(details, 'description'),
address: autocompleteData.description || lodashGet(details, 'description', ''),
lat: lodashGet(details, 'geometry.location.lat', 0),
lng: lodashGet(details, 'geometry.location.lng', 0),
name: lodashGet(details, 'name'),
Expand Down Expand Up @@ -266,7 +266,7 @@ function AddressSearch({

lat: lodashGet(details, 'geometry.location.lat', 0),
lng: lodashGet(details, 'geometry.location.lng', 0),
address: lodashGet(details, 'formatted_address', ''),
address: autocompleteData.description || lodashGet(details, 'formatted_address', ''),
};

// If the address is not in the US, use the full length state name since we're displaying the address's
Expand Down

0 comments on commit a2fc252

Please sign in to comment.