From 7b7b1647510713e66d09554d7fc98ae737d9b4be Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 10 Jan 2020 10:49:39 -0500 Subject: [PATCH] fixes display link --- src/components/Person.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Person.js b/src/components/Person.js index 7224308a..90b4dc4e 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -23,10 +23,11 @@ export default function Person({ person, currentTag }) { rel="noopener noreferrer" className="displayLink" href={person.url} - >{`${url.host}${url.pathname.slice( - 0, - url.pathname.lastIndexOf('/') - )}`} + >{`${url.host}${ + url.pathname.endsWith('/') + ? url.pathname.substr(0, url.pathname.length - 1) + : url.pathname + }`}

{person.description}