Skip to content

Commit

Permalink
fix: session access
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Jun 14, 2024
1 parent 2c9e45a commit 3fba6ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public function shareOnce(Request $request): array

protected function flash(Request $request): ?array
{
if (! $request->hasSession()) {
return null;
}

$type = match (true) {
$request->session()->has('error') => 'error',
$request->session()->has('success') => 'success',
Expand Down

0 comments on commit 3fba6ec

Please sign in to comment.