This commit is contained in:
caishi 2020-06-12 11:31:08 +08:00
parent ba2044b459
commit efe3410c6e
1 changed files with 6 additions and 4 deletions

View File

@ -165,10 +165,12 @@ export function TPMIndexHOC(WrappedComponent) {
this.setState({
tpmLoading: false
})
const { pathname } = this.props.history.location;
console.log("pathname ",pathname);
if(pathname ==="/"){
this.props.history.push(`/users/${response.data.login}`);
if(response.data.login){
const { pathname } = this.props.history.location;
console.log("pathname ",pathname);
if(pathname ==="/"){
this.props.history.push(`/users/${response.data.login}`);
}
}
}
}).catch((error) => {