mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
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:
@@ -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 [];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user