yee 7 years ago
parent
commit
8824507ddd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      js/component/account/set/person.jsx

+ 3 - 3
js/component/account/set/person.jsx

@@ -79,8 +79,8 @@ class PicturesWall extends React.Component {
         this.props.fileList(fileList);
     }
     componentWillReceiveProps(nextProps) {
-        if (nextProps.lifePhotoList && this.state.propsbool) {
-            this.state.fileList = nextProps.lifePhotoList || [];
+        if (nextProps.lifePhotoList.length && this.state.propsbool) {
+            this.state.fileList = nextProps.lifePhotoList ;
             this.state.propsbool = false;
         }
     }
@@ -134,7 +134,7 @@ const PersonFrom = Form.create()(React.createClass({
                         personPortraitUrl: data.data.personPortraitUrl,
                         address: data.data.postalAddress,
                         postcode: data.data.postcode,
-                        lifePhotoList: theArr || []
+                        lifePhotoList: theArr
                     });
                 }
             }.bind(this),