Skip to content

Commit

Permalink
- laod fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpiech97 committed Mar 20, 2024
1 parent 56b359b commit f6981bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Infrastructure/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function share(Request $request): array

protected function getAuthData(Request $request): Closure
{
$user = $request->user();
$user->load("profile");
$user = $request->user()?->load("profile");

return fn(): array => [
"user" => $user ? new UserResource($user) : null,
Expand Down

0 comments on commit f6981bb

Please sign in to comment.