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:
Daniel Lockyer 2022-09-01 16:58:07 +01:00
parent df99e1aec3
commit 1a955dceb4
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD

View File

@ -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;