Skip to content

Commit

Permalink
Merge pull request #520 from vtex/newzealand/fix_4.x
Browse files Browse the repository at this point in the history
fix number not appearing using geolocation in NZL
  • Loading branch information
camilavcoutinho committed May 15, 2023
2 parents 25ecc8a + 3e5e4c2 commit 9e6fa62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Street field using geolocation in New Zealand (NZL) file.

## [4.21.1] - 2023-05-11
### Fixed
- Discard postal code rules when using geolocation mode in `AddressRules`.
Expand Down
9 changes: 8 additions & 1 deletion react/country/NZL.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ export default {
notApplicable: true,
},

street: { valueIn: 'long_name', types: ['route'] },
street: {
valueIn: 'long_name',
types: ['route'],
handler: (address, googleAddress) => {
address.street = { value: googleAddress.name }
return address
},
},

neighborhood: {
valueIn: 'long_name',
Expand Down

0 comments on commit 9e6fa62

Please sign in to comment.