in dotcom-rendering/src/model/enhanceLists.ts [62:94]
body: enhanceElements(elements),
},
];
}
return [];
};
const constructMultiByline =
(enhanceElements: ElementsEnhancer, tags?: TagType[]) =>
({
title,
elements,
bio,
endNote,
contributorImageOverrideUrl,
contributorIds,
byline,
bylineHtml,
}: ListItem): MultiByline[] => {
const contributorIdsArray = contributorIds ?? [];
let imageUrl;
if (contributorImageOverrideUrl) {
imageUrl = contributorImageOverrideUrl;
} else if (tags) {
imageUrl = tags.find((tag) => tag.id === contributorIdsArray[0])
?.bylineImageUrl;
}
// if the element is missing its title, byline, or bylineHtml for any reason, we will skip it
if (title && byline && bylineHtml) {
return [
{