From e2dbda30832a8526576221441c3f60b7a83fc201 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 31 Mar 2021 17:12:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81author?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 2 +- src/forge/DevOps/About.jsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 31f39150..a5a063b0 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -27,7 +27,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } function clearAllCookie() { cookie.remove('_educoder_session', { path: '/' }); diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index b9b10dad..bb79caad 100644 --- a/src/forge/DevOps/About.jsx +++ b/src/forge/DevOps/About.jsx @@ -36,8 +36,7 @@ function About(props, ref) { const [ disabled, setDisabled ] = useState(false); const [ typeFlag, setTypeFlag] = useState(false); - - const AuthorLogin = props.author && props.author.login; + const AuthorLogin = props.projectDetail && props.projectDetail.author && props.projectDetail.author.login; const CurrentLogin = props.current_user && props.current_user.login; useEffect(()=>{ if(CurrentLogin === AuthorLogin){