Skip to content

Commit

Permalink
Fix null bug
Browse files Browse the repository at this point in the history
  • Loading branch information
austinkregel committed May 20, 2024
1 parent fd1ac1d commit a2c6b2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function share(Request $request): array
'conversations' => auth()->check() ? Thread::query()
->with(['messages', 'messages.fromPerson', 'messages.toPerson'])
->whereHas('participants', function ($query) {
$query->where('person_id', auth()->user()->person->id);
$query->where('person_id', auth()->user()?->person()?->id);
})
->orderByDesc('origin_server_ts')
->paginate(
Expand Down

0 comments on commit a2c6b2f

Please sign in to comment.