fix undefined number

This commit is contained in:
kimpure 2026-05-21 15:15:53 +00:00
parent ac279cfbdb
commit 03497a3fb9
No known key found for this signature in database

View file

@ -205,7 +205,7 @@ export function saferKorean(input: string): string {
// Process number, unit
.replace(/(\+\d+[\s\-]+)?([\d\-]+)/g, (_, prefix: string, phone: string) => {
const all = prefix + phone;
const all = (prefix ?? "") + phone;
if (!phone.includes("-")) return all;
return PhoneNumberKorean.convert(all);
})