From 8eef3f84bb24f933a680b609ddc7f53751b59174 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Mon, 15 Aug 2022 16:59:56 +0300 Subject: [PATCH] UI: Fixed bug with calling code after first loading --- ui-ngx/src/app/shared/components/phone-input.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/phone-input.component.ts b/ui-ngx/src/app/shared/components/phone-input.component.ts index 238f3c7134..a620fa6263 100644 --- a/ui-ngx/src/app/shared/components/phone-input.component.ts +++ b/ui-ngx/src/app/shared/components/phone-input.component.ts @@ -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); }