From a089eae12b3e6fce37e56b8a34f6485abc6da303 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 28 Jan 2021 11:52:39 +0300 Subject: [PATCH] micro refactor --- src/client/stores/CalculationStore/Data/values.js | 2 +- src/client/stores/CalculationStore/index.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/stores/CalculationStore/Data/values.js b/src/client/stores/CalculationStore/Data/values.js index 8baf005..cc7bb3e 100644 --- a/src/client/stores/CalculationStore/Data/values.js +++ b/src/client/stores/CalculationStore/Data/values.js @@ -27,7 +27,7 @@ const valuesActions = { if (this.stores.calculationProcess.bypass.status) { const { target, value } = this.stores.calculationProcess.bypass.status; if (target.indexOf(elementName) > -1) { - return value || undefined; + return value; } } return this.statuses[elementName]; diff --git a/src/client/stores/CalculationStore/index.ts b/src/client/stores/CalculationStore/index.ts index 5a5a8c5..5a8ddcf 100644 --- a/src/client/stores/CalculationStore/index.ts +++ b/src/client/stores/CalculationStore/index.ts @@ -33,12 +33,12 @@ export const calculationProcess = makeAutoObservable({ }: { param: ElementParam; target: (ElementsNames | TableNames)[]; - value?: ElementStatus; + value: ElementStatus; }) { this.bypass[param] = { target, value }; }, - clearBypass(prop) { - this.bypass[prop] = undefined; + clearBypass(param: ElementParam) { + this.bypass[param] = undefined; }, });