fix: refs #6818 add early return for empty phone input in parsePhone function
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-11-28 10:28:06 +01:00
parent d4028da92e
commit 6745c15b0e
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import axios from 'axios';
export default async function parsePhone(phone, country) {
if (!phone) return;
if (phone.startsWith('+')) return `${phone.slice(1)}`;
if (phone.startsWith('00')) return `${phone.slice(2)}`;
try {