do not break when failed to load i18n

This commit is contained in:
Pig Fang 2020-03-26 11:19:43 +08:00
parent 3fbf32ed14
commit dbef3043eb

View File

@ -2,6 +2,8 @@
namespace App\Listeners;
use stdClass;
class SerializeGlobals
{
public function handle($event)
@ -13,6 +15,7 @@ class SerializeGlobals
'base_url' => url('/'),
'site_name' => option_localized('site_name'),
'route' => request()->path(),
'i18n' => new stdClass(),
'extra' => [],
];
$event->addContent('<script>const blessing = '.json_encode($blessing).';</script>');