Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcoffee committed Mar 28, 2023
1 parent 71236e3 commit a4c943a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/AddressSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ const AddressSearch = (props) => {
const {
street_number: streetNumber,
route: streetName,
locality: locality,
sublocality: sublocality,
locality,
sublocality,
postal_town: postalTown,
postal_code: zipCode,
administrative_area_level_1: state,
Expand All @@ -132,9 +132,10 @@ const AddressSearch = (props) => {

const values = {
street: props.value ? props.value.trim() : '',

// When locality is not returned, many countries return the city as postalTown (e.g. 5 New Street
// Square, London), otherwise as sublocality (e.g. 384 Court Street Brooklyn). If postalTown is
// returned, the sublocality will be a city subdivision so shouldn't take precedence (e.g.
// Square, London), otherwise as sublocality (e.g. 384 Court Street Brooklyn). If postalTown is
// returned, the sublocality will be a city subdivision so shouldn't take precedence (e.g.
// Salagatan, Upssala, Sweden).
city: locality || postalTown || sublocality,
zipCode,
Expand Down

0 comments on commit a4c943a

Please sign in to comment.