UI: Fixed bug with calling code after first loading
This commit is contained in:
parent
02c7bf4a7c
commit
8eef3f84bb
@ -142,7 +142,7 @@ export class PhoneInputComponent implements OnInit, ControlValueAccessor, Valida
|
||||
this.getFlagAndPhoneNumberData(value);
|
||||
let phoneNumber = this.phoneFormGroup.get('phoneNumber').value;
|
||||
if (phoneNumber) {
|
||||
if (code !== this.countryCallingCode && phoneNumber.includes(code)) {
|
||||
if (code !== '+' && code !== this.countryCallingCode && phoneNumber.includes(code)) {
|
||||
phoneNumber = phoneNumber.replace(code, this.countryCallingCode);
|
||||
this.phoneFormGroup.get('phoneNumber').patchValue(phoneNumber);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user