From f7b666db838607824be0bc794730043fd92cd0b1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 14:01:38 +0800 Subject: [PATCH] prevProps.basicInfo == undefined --- public/react/src/modules/user/account/AccountBasicEdit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 2ef1d5e19..016a32eb5 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -28,8 +28,8 @@ class AccountBasic extends Component { } } - componentDidUpdate =(prevState)=>{ - if(this.props.basicInfo && this.props.basicInfo != prevState.basicInfo){ + componentDidUpdate =(prevProps)=>{ + if(this.props.basicInfo && prevProps.basicInfo == undefined){ this.setValue(this.props.basicInfo); this.getSchoolList(this.props.basicInfo); }