diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index b9897d4a..ae3117a8 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -45,7 +45,6 @@ function Index(props) { const {branches, total_count} = result.data; setTotal(total_count) setList(branches); - setNewFormBranchName(branches[0].name); } setIsSpin(false); }).catch(error=>{setIsSpin(false);}) @@ -56,6 +55,7 @@ function Index(props) { const { author, name} = projectDetail; document.title = `所有分支-${author.name}/${name}`; } + setNewFormBranchName(projectDetail && projectDetail.default_branch); }, [projectDetail]) @@ -387,7 +387,7 @@ function Index(props) {
{newBranchError}
分支起点
- {setNewFormBranchName(value)}} getPopupContainer={triggerNode => triggerNode.parentNode}> {branchList && branchList.map((item, index)=>{ return {item.name} })}