mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
update: safeguard when the backend may not yet support the metrics for db read/writes.
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
metrics: Models.Metric[],
|
||||
endingTotal: number
|
||||
): Array<[string, number]> {
|
||||
return metrics.reduceRight(
|
||||
return (metrics ?? []).reduceRight(
|
||||
(acc, curr) => {
|
||||
acc.data.unshift([curr.date, acc.total]);
|
||||
acc.total -= curr.value;
|
||||
|
||||
Reference in New Issue
Block a user