1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00: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

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;
}
}