Skip to content

Commit 3e402b7

Browse files
authored
🐛 fix error on avatar profile (#95)
1 parent e84a5c7 commit 3e402b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Traits/HasProfilePhoto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function getProfilePhotoUrlAttribute(): ?string
1818
/** @var SocialAccount $social_avatar */
1919
$social_avatar = $this->providers->firstWhere('provider', $this->avatar_type);
2020

21-
return $social_avatar->avatar;
21+
return $social_avatar ? $social_avatar->avatar : $this->defaultProfilePhotoUrl();
2222
}
2323

2424
return $this->defaultProfilePhotoUrl();

0 commit comments

Comments
 (0)