mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-17 05:21:07 +00:00
fix: empty string tel number parsing
This commit is contained in:
parent
990e365f31
commit
f115a6bf02
1 changed files with 5 additions and 3 deletions
|
|
@ -15,9 +15,11 @@
|
|||
|
||||
// You must use E164 number format. It's guarantee the parsing and storing consistency.
|
||||
export let value: E164Number | null;
|
||||
if (value !== null) {
|
||||
// @ts-ignore
|
||||
country = parsePhoneNumber(value).country;
|
||||
if (value !== null && value !== "" ) {
|
||||
let number = parsePhoneNumber(value);
|
||||
if (number !== null && number !== undefined) {
|
||||
country = number.country!;
|
||||
}
|
||||
// console.log(country);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue