fix(File Tree): Stop display commit info if commit sha is empty (github: #53)

github #53
This commit is contained in:
cubic
2022-03-11 11:35:25 +08:00
parent ffc4993cae
commit a2e871ee7e

View File

@@ -222,7 +222,7 @@ class FileTree extends React.Component {
currentPath ? currentPath + '/' + item.name : item.name
)}>{item.name}</Link>
</Typography>,
<Link className={this.props.classes.linkCommitMessage} to={
item.commit && item.commit.sha && <Link className={this.props.classes.linkCommitMessage} to={
makeLink(
this.props.currentRepositoryConfig.group.name,
this.props.currentRepositoryConfig.repository.name,