Skip to content

Commit b3f06d2

Browse files
committed
update: safeguard when the backend may not yet support the metrics for db read/writes.
1 parent bb04620 commit b3f06d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/layout/usage.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
metrics: Models.Metric[],
4444
endingTotal: number
4545
): Array<[string, number]> {
46-
return metrics.reduceRight(
46+
return (metrics ?? []).reduceRight(
4747
(acc, curr) => {
4848
acc.data.unshift([curr.date, acc.total]);
4949
acc.total -= curr.value;

0 commit comments

Comments
 (0)