From ad0515553d3079fceed07f6ded4e8f23bb246bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Sat, 7 Oct 2023 14:33:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=AA=E4=BA=BA=E5=BB=BA?= =?UTF-8?q?=E7=AB=99loading=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Server/pages/index.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); })