Skip to content

Commit

Permalink
Merge pull request #230 from vtex/fix/undefined-postal-code-mask
Browse files Browse the repository at this point in the history
Fix when a given country's postal code mask is undefined
  • Loading branch information
Breno Calazans authored Jan 9, 2020
2 parents 4d44b1b + b18b4ad commit 86a90fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed

- `undefined` postal code mask causing `address-form` to break.

## [4.4.0] - 2020-01-02

Expand Down
1 change: 1 addition & 0 deletions demo/src/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const shipsTo = [
'URY',
'USA',
'VEN',
'ITA',
]

class Container extends Component {
Expand Down
2 changes: 1 addition & 1 deletion react/transforms/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function removeNonWords(string) {
return string.replace(/\W/g, '')
return string && string.replace(/\W/g, '')
}

0 comments on commit 86a90fb

Please sign in to comment.