0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 13:18:11 +00:00

safely destructure

This commit is contained in:
Víctor Losada Hernández
2026-03-22 10:21:53 +01:00
parent 1337612d3d
commit d52452dad7

View File

@@ -19,7 +19,9 @@
<main id="reactRoot"></main>
<script type="module">
const { config: { baseUrl: url }, brew: { title } } = window.__INITIAL_PROPS__;
const props = window.__INITIAL_PROPS__ || {};
const url = props.config?.baseUrl;
const title = props.brew?.title;
let prefix = '';