mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
fix: empty countryCode of current account causes crash (#1603)
* fix: empty countryCode of current account cause crush * Update UserEditPage.js --------- Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
@ -209,7 +209,10 @@ export function initCountries() {
|
||||
}
|
||||
|
||||
export function getCountryCode(country) {
|
||||
return phoneNumber.getCountryCallingCode(country);
|
||||
if (phoneNumber.isSupportedCountry(country)) {
|
||||
return phoneNumber.getCountryCallingCode(country);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
export function getCountryCodeData(countryCodes = phoneNumber.getCountries()) {
|
||||
|
Reference in New Issue
Block a user