From b55edb27491f17cd878c295c438f3b4c6c110c6d Mon Sep 17 00:00:00 2001 From: Ludo Date: Mon, 4 May 2026 17:47:22 +0200 Subject: [PATCH] fix: month and year repeat --- apps/web/src/utils/taskUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/utils/taskUtils.ts b/apps/web/src/utils/taskUtils.ts index 3ba8da1..0e49cee 100644 --- a/apps/web/src/utils/taskUtils.ts +++ b/apps/web/src/utils/taskUtils.ts @@ -20,10 +20,10 @@ export const calculateNextDueDate = (task: Task): Date | null => { nextDue.setDate(nextDue.getDate() + amountNum * 7); break; case 'MONTHS': - nextDue.setMonth(nextDue.getMonth() + amountNum); + nextDue.setMonth(nextDue.setMonth(nextDue.getMonth() + amountNum)); break; case 'YEARS': - nextDue.setFullYear(nextDue.getFullYear() + amountNum); + nextDue.setFullYear(nextDue.setFullYear(nextDue.getFullYear() + amountNum)); break; }