Skip to content

Commit

Permalink
Fix activity log breaking on destroyed subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox committed Mar 2, 2020
1 parent 1cfd81e commit d1a1849
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Controllers/Admin/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ private function formatActivity($activity)
return null;
}

if (is_null($activity->subject)) {
return null;
}

return [
'id' => $activity->id,
'type' => ucfirst($dashboardModule['label_singular'] ?? Str::singular($dashboardModule['name'])),
Expand Down

0 comments on commit d1a1849

Please sign in to comment.