小bug
This commit is contained in:
parent
2f755e8d65
commit
0712904506
|
@ -50,7 +50,6 @@ export default ({ match , history }) => {
|
|||
});
|
||||
}
|
||||
}, [projectsId , owner, sha]);
|
||||
|
||||
return (
|
||||
<div className="main">
|
||||
<Spin spinning={isSpin}>
|
||||
|
@ -60,7 +59,7 @@ export default ({ match , history }) => {
|
|||
{commit && commit.message &&
|
||||
<pre className="task-hide" style={{marginBottom:"0px",height:"28px",whiteSpace:"pre-wrap"}}>{commit.message}</pre>
|
||||
}
|
||||
<Button type="primary" onClick={()=>{history.push(`/projects/${owner}/${projectsId}?${sha && `branch=${truncateCommitId(sha)}`}`)}} className="ml30">浏览代码</Button>
|
||||
<Button type="primary" onClick={()=>{history.push(`/projects/${owner}/${projectsId}?branch=${truncateCommitId(sha)}`)}} className="ml30">浏览代码</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="f-wrap-between" style={{ alignItems: "center" }}>
|
||||
|
|
|
@ -3,6 +3,6 @@ export function truncateCommitId(str) {
|
|||
if (str && str.length > 11) {
|
||||
return str.substring(0, 10)
|
||||
}else{
|
||||
return undefined
|
||||
return str
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue