Update NotificationTransformer

This commit is contained in:
Daniel Supernault 2019-02-14 14:22:46 -07:00
parent 13430a9a37
commit 705d4ef942
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -31,7 +31,7 @@ class NotificationTransformer extends Fractal\TransformerAbstract
public function includeStatus(Notification $notification)
{
$item = $notification->item;
if(get_class($item) === 'App\Status') {
if(is_object($item) && get_class($item) === 'App\Status') {
return $this->item($item, new StatusTransformer());
} else {
return null;