From: Jérôme Benoit Date: Tue, 5 Mar 2024 20:34:30 +0000 (+0100) Subject: fix(ui): fix global properties init X-Git-Tag: v1.3.0~48 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=68c6d508a8e4eb7e67c4f174c0f3d305829c2eaf;p=e-mobility-charging-stations-simulator.git fix(ui): fix global properties init Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/main.ts b/ui/web/src/main.ts index 8181374e..640adf9f 100644 --- a/ui/web/src/main.ts +++ b/ui/web/src/main.ts @@ -21,10 +21,10 @@ const initializeApp = (app: AppType, config: ConfigurationData) => { if (app.config.globalProperties.$configuration == null) { app.config.globalProperties.$configuration = ref(config) } - if (!Array.isArray(app.config.globalProperties.$templates.value)) { + if (!Array.isArray(app.config.globalProperties.$templates?.value)) { app.config.globalProperties.$templates = ref([]) } - if (!Array.isArray(app.config.globalProperties.$chargingStations.value)) { + if (!Array.isArray(app.config.globalProperties.$chargingStations?.value)) { app.config.globalProperties.$chargingStations = ref([]) } if (