fix(ui): fix global properties init
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 5 Mar 2024 20:34:30 +0000 (21:34 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 5 Mar 2024 20:34:30 +0000 (21:34 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/main.ts

index 8181374ec60f760296c2aa0788545794dded14ec..640adf9f6fd9e225ea6991a3271b13f78f8f1f01 100644 (file)
@@ -21,10 +21,10 @@ const initializeApp = (app: AppType, config: ConfigurationData) => {
   if (app.config.globalProperties.$configuration == null) {
     app.config.globalProperties.$configuration = ref<ConfigurationData>(config)
   }
-  if (!Array.isArray(app.config.globalProperties.$templates.value)) {
+  if (!Array.isArray(app.config.globalProperties.$templates?.value)) {
     app.config.globalProperties.$templates = ref<string[]>([])
   }
-  if (!Array.isArray(app.config.globalProperties.$chargingStations.value)) {
+  if (!Array.isArray(app.config.globalProperties.$chargingStations?.value)) {
     app.config.globalProperties.$chargingStations = ref<ChargingStationData[]>([])
   }
   if (