From 336bc6edc30b3ec7429ce896ada7afe6e1c1ad52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 30 Jul 2019 15:57:10 +0800 Subject: [PATCH] b --- .../PackageIndexNEIBannerConcent.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index e8ae230a7..a9de27f27 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -119,9 +119,12 @@ class PackageIndexNEIBannerConcent extends Component { componentDidUpdate = (prevProps) => { if(prevProps.current_user.username!=this.props.current_user){ - this.setState({ - contact_name:this.props.current_user&&this.props.current_user.username - }) + if(this.props.current_user!=undefined){ + this.setState({ + contact_name:this.props.current_user.username + }) + } + } } //获取验证码;