diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index e00a85fa..6e5791df 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -259,9 +259,9 @@ class NewHeader extends Component { NewCoursesAndShixuns=(sum)=>{ - if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){ + if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null||this.props.current_user&&this.props.current_user=== ""){ window.location.href = "/login"; - }else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user===null){ + }else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user=== ""){ window.location.href = "/login"; }else if(sum===1){ window.location.href = "/courses/new"; @@ -478,8 +478,8 @@ class NewHeader extends Component {