1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +01:00

fix fullAddressPart2 state if empty should not show in address line (#62)

* not all countries have states

* semi colons
This commit is contained in:
Joseph Petersen 2020-02-01 22:15:27 +01:00 committed by GitHub
parent 08b1a022f6
commit 3a40cb83bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,8 +108,13 @@ export class IdentityView implements View {
return null;
}
const city = this.city || '-';
const state = this.state || '-';
const state = this.state;
const postalCode = this.postalCode || '-';
return city + ', ' + state + ', ' + postalCode;
let addressPart2 = city;
if (!Utils.isNullOrWhitespace(state)) {
addressPart2 += ', ' + state;
}
addressPart2 += ', ' + postalCode;
return addressPart2;
}
}