perf: ⚡ Cambiata funzione in modo da essere più performante
Motivo: Inspection EA Ultimate e [is_file or file_exists in PHP](https://stackoverflow.com/a/792909)
This commit is contained in:
parent
18c9c22c22
commit
c0054373dc
|
@ -38,7 +38,7 @@ class HandleInertiaRequests extends Middleware
|
|||
'locale' => fn () => app()->getLocale(),
|
||||
'translations' => function () {
|
||||
$json = resource_path('lang/'.app()->getLocale().'.json');
|
||||
if (!file_exists($json)) {
|
||||
if (!is_file($json)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue