From f206d310830c26da06f9ab8b473197dbfe3cd288 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Wed, 20 Apr 2022 09:03:13 +0100 Subject: [PATCH] Add correct rel values to anchored links --- components/poll/truncated-linkify.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/poll/truncated-linkify.tsx b/components/poll/truncated-linkify.tsx index 0f1629624..4d83d49fe 100644 --- a/components/poll/truncated-linkify.tsx +++ b/components/poll/truncated-linkify.tsx @@ -10,9 +10,10 @@ export const truncateLink = (href: string, text: string, key: number) => { if (beginningOfPath !== -1) { finalText = textWithoutProtocol.substring(0, beginningOfPath + 15); } + if (finalText.length === textWithoutProtocol.length) { return ( - + {finalText} ); @@ -25,7 +26,9 @@ export const truncateLink = (href: string, text: string, key: number) => {
{href}
} > - {finalText} + + {finalText} + ); }