fix blessing global
This commit is contained in:
parent
d242c124e9
commit
b8dab4b57a
|
|
@ -141,7 +141,6 @@ class HeadComposer
|
|||
'base_url' => url('/'),
|
||||
'site_name' => option_localized('site_name'),
|
||||
'route' => request()->path(),
|
||||
'i18n' => new \stdClass(),
|
||||
];
|
||||
$view->with('blessing', $blessing);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
export function getExtraData(): any {
|
||||
export function getExtraData(): Record<string, any> {
|
||||
const jsonElement = document.querySelector('#blessing-extra')
|
||||
/* istanbul ignore next */
|
||||
if (jsonElement) {
|
||||
return JSON.parse(jsonElement.textContent ?? '{}')
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
const extraData = getExtraData()
|
||||
if (extraData) {
|
||||
blessing.extra = extraData
|
||||
}
|
||||
blessing.extra = getExtraData()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user