Skip to content

Commit 7c8105c

Browse files
authored
fix: fix avatar not being loaded on dashboard (#6224)
1 parent d98bd0a commit 7c8105c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/Models/Contact/Contact.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,11 @@ public function getAvatarURL()
11521152
$avatarURL = $this->avatar_gravatar_url;
11531153
break;
11541154
case 'photo':
1155-
$avatarURL = $this->avatarPhoto()->first()->url();
1155+
if ($this->avatarPhoto) {
1156+
$avatarURL = $this->avatarPhoto()->first()->url();
1157+
} else {
1158+
$avatarURL = $this->getAvatarDefaultURL();
1159+
}
11561160
break;
11571161
case 'default':
11581162
default:

0 commit comments

Comments
 (0)