From cf9ef6fb83015350b7da61fdef2b035bad3feb2b Mon Sep 17 00:00:00 2001 From: Chika Date: Sun, 4 Apr 2021 20:57:32 +0300 Subject: [PATCH] fix leasingPeriod doesn't change self state value --- .../CalculationStore/Effects/reactions/otherReactions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts b/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts index f1e294d..49b011e 100644 --- a/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts +++ b/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts @@ -1350,7 +1350,9 @@ const reactionEffects: IReactionEffect[] = [ }, effect: ({ graphType, leasingPeriod }) => { if (graphType === 100000003 && leasingPeriod < 14) { - calculationStore.setValue('leasingPeriod', 14); + setTimeout(() => { + calculationStore.setValue('leasingPeriod', 14); + }, 0); openNotification({ type: 'warning', title: 'Внимание',