From 6745c15b0efe762aa9403b97252ed2aa3c7747f1 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 28 Nov 2024 10:28:06 +0100 Subject: [PATCH] fix: refs #6818 add early return for empty phone input in parsePhone function --- src/filters/parsePhone.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/filters/parsePhone.js b/src/filters/parsePhone.js index 4fcf1386d..27474321f 100644 --- a/src/filters/parsePhone.js +++ b/src/filters/parsePhone.js @@ -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 {