Skip to content

Commit

Permalink
fix: fix avatar not being loaded on dashboard (#6224)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss authored Jul 13, 2022
1 parent d98bd0a commit 7c8105c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Models/Contact/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,11 @@ public function getAvatarURL()
$avatarURL = $this->avatar_gravatar_url;
break;
case 'photo':
$avatarURL = $this->avatarPhoto()->first()->url();
if ($this->avatarPhoto) {
$avatarURL = $this->avatarPhoto()->first()->url();
} else {
$avatarURL = $this->getAvatarDefaultURL();
}
break;
case 'default':
default:
Expand Down

0 comments on commit 7c8105c

Please sign in to comment.