From 600bb1a7305bf054615db8077d427e4bb8e1527a Mon Sep 17 00:00:00 2001 From: Chika Date: Fri, 14 Oct 2022 13:55:17 +0300 Subject: [PATCH] fix ca8d060 --- process/payments/reactions.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/process/payments/reactions.ts b/process/payments/reactions.ts index ddfb695..07043c9 100644 --- a/process/payments/reactions.ts +++ b/process/payments/reactions.ts @@ -435,7 +435,9 @@ export default function paymentsReactions( shift(seasons, shiftNumber) ); const shiftedPeriods = new Set( - seasonsConstants.SEASONS_PERIODS[seasonType].map((x) => x + shiftNumber) + seasonsConstants.SEASONS_PERIODS[seasonType].map( + (position) => (position + shiftNumber) % seasonsConstants.SEASONS_PERIOD_NUMBER + ) ); const rows: Row[] = payments.map((value, i) => ({ value, @@ -493,7 +495,9 @@ export default function paymentsReactions( shift(seasons, shiftNumber) ); const shiftedPeriods = new Set( - seasonsConstants.SEASONS_PERIODS[seasonType].map((x) => x + shiftNumber) + seasonsConstants.SEASONS_PERIODS[seasonType].map( + (position) => (position + shiftNumber) % seasonsConstants.SEASONS_PERIOD_NUMBER + ) ); const rows: Row[] = payments.map((value, i) => ({ value,