IO-1273 Graceful error on job totals.
This commit is contained in:
@@ -13,7 +13,10 @@ export default function DashboardProjectedMonthlySales({ data, ...cardProps }) {
|
||||
const dollars =
|
||||
data.projected_monthly_sales &&
|
||||
data.projected_monthly_sales.reduce(
|
||||
(acc, val) => acc.add(Dinero(val.job_totals.totals.subtotal)),
|
||||
(acc, val) =>
|
||||
acc.add(
|
||||
Dinero(val.job_totals.totals && val.job_totals.totals.subtotal)
|
||||
),
|
||||
Dinero()
|
||||
);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user