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; }, });