Skip to content

Commit ef77979

Browse files
committed
Fix error on reduce for 0 entries
1 parent a189202 commit ef77979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/src/dashboard/Entry/DashboardTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const DashboardTable: React.FC<DashboardTableProps> = ({entries, interval
3131
}, {}),
3232
};
3333
if (total) {
34-
result.data['Total'] = Object.values(result.data).reduce((acc, value) => acc + value);
34+
result.data['Total'] = Object.values(result.data).reduce((acc, value) => acc + value, 0);
3535
}
3636
return result;
3737
})

0 commit comments

Comments
 (0)