Fix avatar/gravatar call throwing error

This commit is contained in:
Nabeel Shahzad
2020-03-25 10:58:03 -04:00
parent eafea01e22
commit cce575c1a6
4 changed files with 17 additions and 8 deletions

View File

@@ -143,9 +143,7 @@ class User extends Authenticatable
public function getAvatarAttribute()
{
if (!$this->attributes['avatar']) {
return new File([
'path' => $this->gravatar(),
]);
return null;
}
return new File([