diff --git a/src/forge/Server/pages/index.jsx b/src/forge/Server/pages/index.jsx index 84c0abf1a..521304bc3 100644 --- a/src/forge/Server/pages/index.jsx +++ b/src/forge/Server/pages/index.jsx @@ -32,9 +32,11 @@ function Pages(props) { // 获取站点列表 axios.get(`/site_pages/x.json`, {params:{owner, repo: projectsId}}).then(res=>{ if(res && res.status === 200){ - const {last_build_info} = res.data.data setPageInfo(res.data.data); - last_build_info && last_build_info.length && setResult(last_build_info); + if(res.data.data){ + const {last_build_info} = res.data.data; + last_build_info && last_build_info.length && setResult(last_build_info); + } } setLoading(false); })