diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 05376c6c0..17536164d 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -242,14 +242,16 @@ class Detail extends Component{ const { project_id } = this.state; const url = `/projects/${project_id}/forks.json`; axios.post(url).then(result=>{ - if(result && result.data.status === 0){ - this.props.history.push(`/projects/${result.data.id}/coders`); - this.props.showNotification(result.data.message); - this.setState({ + if (result) { + if (result.data.status === 0) { + this.props.history.push(`/projects/${result.data.id}/coders`); + } + this.setState({ isSpin:false }) - }else{ - this.props.showNotification(result.data.message); + this.props.showNotification(result.data.message); + } else { + this.props.showNotification(`服务器开小差了`); } }).catch(error=>{ console.log(error);