Do not render last commit date when it's missing

This commit is contained in:
René Pfeuffer
2020-11-24 10:33:57 +01:00
parent 7a47e68707
commit 07cf290370

View File

@@ -62,9 +62,11 @@ const BranchRow: FC<Props> = ({ baseUrl, branch, onDelete }) => {
{branch.name}
<DefaultBranchTag defaultBranch={branch.defaultBranch} />
</ReactLink>
<Created className="has-text-grey is-ellipsis-overflow">
{t("branches.table.lastCommit")} <DateFromNow date={branch.lastCommitDate} />
</Created>
{branch.lastCommitDate && (
<Created className="has-text-grey is-ellipsis-overflow">
{t("branches.table.lastCommit")} <DateFromNow date={branch.lastCommitDate} />
</Created>
)}
</td>
<td className="is-darker">{deleteButton}</td>
</tr>