Style: format contact label helper

This commit is contained in:
Mahmoud Ibrahim
2026-01-10 01:31:22 +02:00
committed by Peter Steinberger
parent 77c7387bbd
commit 18338bc60f

View File

@@ -820,8 +820,7 @@ function formatContactLabel(
}
function formatPhoneList(phones?: string[]): string | undefined {
const cleaned =
phones?.map((phone) => phone.trim()).filter(Boolean) ?? [];
const cleaned = phones?.map((phone) => phone.trim()).filter(Boolean) ?? [];
if (cleaned.length === 0) return undefined;
const [primary, ...rest] = cleaned;
if (!primary) return undefined;