Skip to content

Commit

Permalink
add fallback value
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizmaselli committed Jun 13, 2024
1 parent 56825e5 commit 80e6771
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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]

### Added
- fallback value for administrativeAreaLevel1 for profile V2

## [2.170.2] - 2024-05-02

### Changed
Expand Down
4 changes: 2 additions & 2 deletions node/clients/profile/profileV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class ProfileClientV2 extends JanusClient {
postalCode: addressV2.postalCode,
receiverName: addressV2.receiverName,
reference: addressV2.nearly,
state: addressV2.administrativeAreaLevel1,
state: addressV2.administrativeAreaLevel1 ?? '',
street: addressV2.route,
userId: addressV2.profileId,
addressType: addressV2.addressType ?? 'residential',
Expand All @@ -213,7 +213,7 @@ export class ProfileClientV2 extends JanusClient {
return {
id: address.id,
document: {
administrativeAreaLevel1: address.state,
administrativeAreaLevel1: address.state ?? '',
addressName: address.addressName ?? address.id,
addressType: address.addressType ?? 'residential',
countryCode: address.country,
Expand Down

0 comments on commit 80e6771

Please sign in to comment.