From d04c3b9ef12da7f313c5107bb055e7e2c8a29b87 Mon Sep 17 00:00:00 2001 From: Tushar Inani Date: Sat, 22 Jun 2024 09:25:01 +0000 Subject: [PATCH] fix: goal budget summary --- src/hooks/useBudgetSummaryStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useBudgetSummaryStore.ts b/src/hooks/useBudgetSummaryStore.ts index 35c6fbd97..72c060bfa 100644 --- a/src/hooks/useBudgetSummaryStore.ts +++ b/src/hooks/useBudgetSummaryStore.ts @@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next"; const useBudgetSummaryStore = (goal: GoalItem) => { const { t } = useTranslation(); - const { perDay, perWeek } = goal.timeBudget!; + const { perDay = null, perWeek = null } = goal.timeBudget || {}; const getPerDaySummary = () => formatBudgetHrsToText(perDay);