fix: add null check in sanitizePhoneNumber helper to prevent errors
parent
7f27061240
commit
40df9c4c08
|
@ -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, '');
|
||||
|
||||
|
|
Loading…
Reference in New Issue