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