2
0
Эх сурвалжийг харах

Merge pull request #10535 from growilabs/fix/174425-profile-image-uploaded-in-user-settings-is-not-displayed

fix: Profile image uploaded in user settings is not displayed
Yuki Takei 6 сар өмнө
parent
commit
9cbee49555

+ 6 - 1
apps/app/src/pages/common-props/commons.ts

@@ -153,7 +153,12 @@ export const getServerSideCommonEachProps = async (
 
 
   let currentUser: IUserHasId | undefined;
   let currentUser: IUserHasId | undefined;
   if (user != null) {
   if (user != null) {
-    currentUser = user.toObject();
+    const User = crowi.model('User');
+    const userData = await User.findById(user.id).populate({
+      path: 'imageAttachment',
+      select: 'filePathProxied',
+    });
+    currentUser = userData.toObject();
   }
   }
 
 
   // Redirect destination for page transition by next/link
   // Redirect destination for page transition by next/link