From ffbb082e76ad4d4fd4cde7fa40554cd5d43c686a Mon Sep 17 00:00:00 2001 From: Lucas ONeil Date: Fri, 10 Jan 2025 10:27:34 -0800 Subject: [PATCH] Fix TS no-unsafe-optional-chaining errors Signed-off-by: Lucas ONeil --- services/tenant-ui/frontend/src/components/layout/Sidebar.vue | 3 +-- services/tenant-ui/frontend/src/main.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/services/tenant-ui/frontend/src/components/layout/Sidebar.vue b/services/tenant-ui/frontend/src/components/layout/Sidebar.vue index 5cc976a5e..bf1e0ade9 100644 --- a/services/tenant-ui/frontend/src/components/layout/Sidebar.vue +++ b/services/tenant-ui/frontend/src/components/layout/Sidebar.vue @@ -105,8 +105,7 @@ const sidebarItems = [ }, ]; -const { logStreamUrl } = config?.frontend; -if (logStreamUrl) { +if (config?.frontend?.logStreamUrl) { sidebarItems.push({ label: t('log.log'), icon: 'pi pi-fw pi-file', diff --git a/services/tenant-ui/frontend/src/main.ts b/services/tenant-ui/frontend/src/main.ts index 9c27258f5..3eb6203cf 100644 --- a/services/tenant-ui/frontend/src/main.ts +++ b/services/tenant-ui/frontend/src/main.ts @@ -68,8 +68,7 @@ async function loadApp() { } // Log Setup - const { logStreamUrl } = configStore?.config?.frontend; - if (!logStreamUrl) { + if (!configStore?.config?.frontend?.logStreamUrl) { console.warn('Log not configured'); router.removeRoute('Log'); }