Skip to content

Commit

Permalink
Fix tests for nullable locale
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryMoustache authored Feb 20, 2024
1 parent eb1c0e3 commit 8ee1ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Middleware/SetLocale.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function handle(Request $request, Closure $next)
return $next($request);
}

$locale = Str::after($request->route()->getPrefix(), '/');
$locale = Str::after($request->route()?->getPrefix(), '/');

if (is_livewire_route($request)) {
$snapshot = json_decode($request->json('components.0.snapshot', ''), true);
Expand Down

0 comments on commit 8ee1ce8

Please sign in to comment.