Explorar o código

Merge pull request #1910 from weseek/hotfix/fix-user-image-2

Hotfix/fix user image 2
Yuki Takei %!s(int64=6) %!d(string=hai) anos
pai
achega
bf60229cc7
Modificáronse 2 ficheiros con 8 adicións e 1 borrados
  1. 5 1
      CHANGES.md
  2. 3 0
      src/client/js/services/PersonalContainer.js

+ 5 - 1
CHANGES.md

@@ -1,9 +1,13 @@
 # CHANGES
 # CHANGES
 
 
-## v3.7.4-RC
+## v3.7.5
 
 
 *
 *
 
 
+## v3.7.4
+
+* Fix: Broken by displaying user image
+
 ## v3.7.3
 ## v3.7.3
 
 
 * Feature: Profile Image Cropping
 * Feature: Profile Image Cropping

+ 3 - 0
src/client/js/services/PersonalContainer.js

@@ -70,6 +70,9 @@ export default class PersonalContainer extends Container {
    * define a function for uploaded picture
    * define a function for uploaded picture
    */
    */
   getUploadedPictureSrc(user) {
   getUploadedPictureSrc(user) {
+    if (user == null) {
+      return DEFAULT_IMAGE;
+    }
     if (user.image) {
     if (user.image) {
       this.setState({ isUploadedPicture: true });
       this.setState({ isUploadedPicture: true });
       return user.image;
       return user.image;