# Pastebin mlSe95uX const relationshipTypes = [...new Set(relationships .map(getRelationshipLinkType) .filter(type => type.gid && type.name))]; if (!relationshipTypes?.length) { return null; } const docLinks = relationshipTypes.map(relationshipType => exp.l( '“{doc_link|{name}}”', { doc_link: { href: '/relationship/' + relationshipType.gid, target: '_blank', }, name: relationshipType.name, }, ));