mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed showing default image for staff users
refs https://github.com/TryGhost/Toolbox/issues/356 - without this, users who have an account but no profile image will just show an empty background
This commit is contained in:
parent
df99e1aec3
commit
1a955dceb4
1 changed files with 7 additions and 1 deletions
|
@ -38,8 +38,14 @@ function getActor(ev) {
|
|||
}
|
||||
|
||||
function getActorIcon(ev, assetRoot) {
|
||||
const defaultImage = `${assetRoot}/img/user-image.png`;
|
||||
|
||||
if (!ev.actor.id) {
|
||||
return `${assetRoot}/img/user-image.png`;
|
||||
return defaultImage;
|
||||
}
|
||||
|
||||
if (!ev.actor.image) {
|
||||
return defaultImage;
|
||||
}
|
||||
|
||||
return ev.actor.image;
|
||||
|
|
Loading…
Add table
Reference in a new issue