From 82c90ebc2668d2fe2d07bbef6fe689932e7865e9 Mon Sep 17 00:00:00 2001 From: Tii Date: Wed, 16 Oct 2024 10:15:10 +0200 Subject: [PATCH] Bugfix --- app/Http/Middleware/HandleInertiaRequests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index b0c1e7d..6439b85 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -53,7 +53,7 @@ public function share(Request $request): array return [ ...parent::share($request), 'auth' => [ - 'user' => $request->user()->append(['image_url']), + 'user' => $request->user()?->append(['image_url']), 'can' => [ 'access_admin' => $request->user()?->can('access-admin') ?? false, ],