ToUpper the country code

pull/21833/head
Travis Ralston 2019-06-01 09:12:09 -06:00
parent c12ef8829c
commit ecc0552e89
1 changed files with 3 additions and 2 deletions

View File

@ -47,8 +47,9 @@ export default class CountryDropdown extends React.Component {
this._getShortOption = this._getShortOption.bind(this);
let defaultCountry = COUNTRIES[0];
if (SdkConfig.get()["defaultCountryCode"]) {
const country = COUNTRIES.find(c => c.iso2 === SdkConfig.get()["defaultCountryCode"]);
const defaultCountryCode = SdkConfig.get()["defaultCountryCode"];
if (defaultCountryCode) {
const country = COUNTRIES.find(c => c.iso2 === defaultCountryCode.toUpperCase());
if (country) defaultCountry = country;
}