From b8a587080f0a64bcbb26eb2d2a6d93ac7518003f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 26 Jul 2019 17:53:42 +0800 Subject: [PATCH] b --- public/react/src/modules/tpm/NewHeader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 {