From 88045fe0d1f0a1b2743bc9cec6518be3947c007d Mon Sep 17 00:00:00 2001 From: Bread Genie Date: Thu, 28 Nov 2024 14:41:09 +0530 Subject: [PATCH] fix(LogBrowser): handle empty log --- dashboard/src2/pages/devtools/log-browser/LogViewer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/src2/pages/devtools/log-browser/LogViewer.vue b/dashboard/src2/pages/devtools/log-browser/LogViewer.vue index 9aed6d3417..aa0d1701a6 100644 --- a/dashboard/src2/pages/devtools/log-browser/LogViewer.vue +++ b/dashboard/src2/pages/devtools/log-browser/LogViewer.vue @@ -236,14 +236,14 @@ const columnFilters = computed(() => { const logEntries = computed(() => props.log); const columns = computed(() => { - const columns = Object.keys(logEntries.value[0]); + const columns = Object.keys(logEntries.value[0] || {}); columns.sort((a, b) => { if (a === 'description') return 1; if (b === 'description') return -1; return 0; }); - return columns; + return columns.length ? columns : ['description']; }); const sortingState = computed(() => { if (!sortOrder.value) return [];