IO-1273 Graceful error on job totals.

This commit is contained in:
Patrick Fic
2021-07-27 11:19:23 -07:00
parent 8ca3741a52
commit 35323ba624
3 changed files with 9 additions and 3 deletions

View File

@@ -14,7 +14,8 @@ export default function DashboardTotalProductionDollars({
const dollars =
data.production_jobs &&
data.production_jobs.reduce(
(acc, val) => acc.add(Dinero(val.job_totals.totals.subtotal)),
(acc, val) =>
acc.add(Dinero(val.job_totals && val.job_totals.totals.subtotal)),
Dinero()
);