From 9746b83fb567223f730f5e71fba0262d3316e2c5 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 18 Oct 2024 12:05:17 +0200 Subject: [PATCH] add requested changes --- .../daily-plan/add-daily-plan-work-hours-modal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/lib/features/daily-plan/add-daily-plan-work-hours-modal.tsx b/apps/web/lib/features/daily-plan/add-daily-plan-work-hours-modal.tsx index cb9c11d86..eb8ab7fc1 100644 --- a/apps/web/lib/features/daily-plan/add-daily-plan-work-hours-modal.tsx +++ b/apps/web/lib/features/daily-plan/add-daily-plan-work-hours-modal.tsx @@ -35,9 +35,9 @@ export function AddDailyPlanWorkHourModal(props: IAddDailyPlanWorkHoursModalProp setLoading(true); // Update the plan work time only if the user changed it - plan && - plan.workTimePlanned !== workTimePlanned && - (await updateDailyPlan({ workTimePlanned }, plan.id ?? '')); + if (plan && plan.workTimePlanned !== workTimePlanned) { + await updateDailyPlan({ workTimePlanned }, plan.id ?? ''); + } startTimer(); @@ -87,7 +87,7 @@ export function AddDailyPlanWorkHourModal(props: IAddDailyPlanWorkHoursModalProp