fix: add null check in sanitizePhoneNumber helper to prevent errors

production 1.6.1-production.3
shancheas 2025-07-09 11:29:13 +07:00
parent 7f27061240
commit 40df9c4c08
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ export function phoneNumberOnly(phone: string): string {
}
export function sanitizePhoneNumber(phone: string): string {
if (!phone) return phone;
// Remove all non-numeric characters first
const cleanPhone = phone.replace(/[^0-9]/g, '');