diff --git a/community-website/utils/utils.ts b/community-website/utils/utils.ts index e4c6953..6ff5d4f 100644 --- a/community-website/utils/utils.ts +++ b/community-website/utils/utils.ts @@ -4,7 +4,8 @@ export function truncateNames():void { if (subscriptElementsArray !== null) { subscriptElementsArray.forEach((subscriptElement) => { const wordLength = subscriptElement?.textContent?.length || 0; - if (wordLength> 13) { + if (wordLength === 0) return; // Skip elements without text content + if (wordLength > 13) { subscriptElement.innerHTML = "" + subscriptElement?.textContent?.substr(0, 10) + "..." + ""; } })