diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css index 00afd562..c5fc5204 100644 --- a/src/modules/tpm/TPMIndex.css +++ b/src/modules/tpm/TPMIndex.css @@ -437,7 +437,7 @@ body>.-task-title { border: none; padding: 0px; } -.newFooter .module-list>a { +.newFooter .module-list a { display: block; color: #bbb; line-height: 34px; diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index ee18c651..9418b47b 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -169,12 +169,14 @@ export function TPMIndexHOC(WrappedComponent) { if (this.props.match.path === "/" && response.data.login) { this.props.history.push(`/users/${response.data.login}`); } - if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){ - this.setState({ - giteaVisible:true, - email:response.data.email, - is_sync_pwd:response.data.is_sync_pwd - }) + if(response.data && response.data.login){ + if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){ + this.setState({ + giteaVisible:true, + email:response.data.email, + is_sync_pwd:response.data.is_sync_pwd + }) + } } } }).catch((error) => {