fix `fullAddressPart2` state if empty should not show in address line (#62)
* not all countries have states * semi colons
This commit is contained in:
parent
08b1a022f6
commit
3a40cb83bf
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue