Fixed avatar not displaying in issue boards
This happens when Gravatar is disabled in the admin settings, the avatar is returned as null & then frontend didn't do anything about it. Closes #31428
This commit is contained in:
parent
ef518df28a
commit
79d50538c4
|
@ -1,11 +1,12 @@
|
|||
/* eslint-disable no-unused-vars */
|
||||
import defaultAvatar from '../utils/default_avatar';
|
||||
|
||||
class ListUser {
|
||||
constructor(user) {
|
||||
this.id = user.id;
|
||||
this.name = user.name;
|
||||
this.username = user.username;
|
||||
this.avatar = user.avatar_url;
|
||||
this.avatar = user.avatar_url || defaultAvatar();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export default () => document.getElementById('board-app').dataset.defaultAvatar;
|
|
@ -9,6 +9,7 @@ module BoardsHelper
|
|||
issue_link_base: namespace_project_issues_path(@project.namespace, @project),
|
||||
root_path: root_path,
|
||||
bulk_update_path: bulk_update_namespace_project_issues_path(@project.namespace, @project),
|
||||
default_avatar: image_path(default_avatar)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fixed avatar not display on issue boards when Gravatar is disabled
|
||||
merge_request:
|
||||
author:
|
Loading…
Reference in New Issue