Skip to content

Commit

Permalink
fix(LogBrowser): handle empty log
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Nov 28, 2024
1 parent a3b5b7a commit 88045fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard/src2/pages/devtools/log-browser/LogViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
Expand Down

0 comments on commit 88045fe

Please sign in to comment.