fixes display link

This commit is contained in:
Wes Bos 2020-01-10 10:49:39 -05:00
parent 154411c8a3
commit 7b7b164751

View file

@ -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('/')
)}`}</a>
>{`${url.host}${
url.pathname.endsWith('/')
? url.pathname.substr(0, url.pathname.length - 1)
: url.pathname
}`}</a>
</header>
<p>{person.description}</p>
<Tags>