Fixes bug where repo was not displayed in UI. Closes #1883 (#1892)

This commit is contained in:
Alex Collins 2019-07-08 14:07:20 -07:00 committed by GitHub
parent a123f0bd37
commit 43d2848c12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ import * as React from 'react';
import {repoUrl} from './urls';
export const Repo = ({url, children}: { url: string, children?: React.ReactNode }) => {
url = repoUrl(url);
const href = repoUrl(url);
const content = children || url;
return url !== null ? <a href={url}>{content}</a> : <span>{content}</span>;
return href !== null ? <a href={href}>{content}</a> : <span>{content}</span>;
};