Metamigo frontend build fixes
This commit is contained in:
parent
7aeb903a9e
commit
de17d54434
3 changed files with 15 additions and 13 deletions
|
|
@ -13,11 +13,11 @@ export const sanitizeE164Number = (phoneNumber: string) => {
|
|||
if (!phoneNumber) return "";
|
||||
if (!phoneNumber.trim()) return "";
|
||||
const sanitized = phoneNumber
|
||||
.replace(/\s/g, "")
|
||||
.replace(/\./g, "")
|
||||
.replace(/-/g, "")
|
||||
.replace(/\(/g, "")
|
||||
.replace(/\)/g, "");
|
||||
.replaceAll(/\s/g, "")
|
||||
.replaceAll(".", "")
|
||||
.replaceAll("-", "")
|
||||
.replaceAll("(", "")
|
||||
.replaceAll(")", "");
|
||||
|
||||
if (sanitized[0] !== "+") return `+${sanitized}`;
|
||||
return sanitized;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue