mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +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:
@@ -108,8 +108,13 @@ export class IdentityView implements View {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const city = this.city || '-';
|
const city = this.city || '-';
|
||||||
const state = this.state || '-';
|
const state = this.state;
|
||||||
const postalCode = this.postalCode || '-';
|
const postalCode = this.postalCode || '-';
|
||||||
return city + ', ' + state + ', ' + postalCode;
|
let addressPart2 = city;
|
||||||
|
if (!Utils.isNullOrWhitespace(state)) {
|
||||||
|
addressPart2 += ', ' + state;
|
||||||
|
}
|
||||||
|
addressPart2 += ', ' + postalCode;
|
||||||
|
return addressPart2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user