yusuketk 5 лет назад
Родитель
Сommit
07c4a53781
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/server/models/user.js

+ 2 - 2
src/server/models/user.js

@@ -255,10 +255,10 @@ module.exports = function(crowi) {
       const hash = md5(email.trim().toLowerCase());
       const hash = md5(email.trim().toLowerCase());
       return `https://gravatar.com/avatar/${hash}`;
       return `https://gravatar.com/avatar/${hash}`;
     }
     }
-    if (this.image) {
+    if (this.image != null) {
       return this.image;
       return this.image;
     }
     }
-    if (this.imageAttachment) {
+    if (this.imageAttachment != null && this.imageAttachment.id != null) {
       const Attachment = crowi.model('Attachment');
       const Attachment = crowi.model('Attachment');
       const imageAttachment = await Attachment.findById(this.imageAttachment);
       const imageAttachment = await Attachment.findById(this.imageAttachment);
       return imageAttachment.filePathProxied;
       return imageAttachment.filePathProxied;