diff --git a/source/components/ComparativeTargets.js b/source/components/ComparativeTargets.js index 6a09c62b2..ec55be1b0 100644 --- a/source/components/ComparativeTargets.js +++ b/source/components/ComparativeTargets.js @@ -27,7 +27,7 @@ const connectRègles = (situationBranchName: string) => situationBranchName })('revenu net') }: { - revenuDisponible: RègleAvecMontant + revenuDisponible: boolean | RègleAvecMontant }) }, { diff --git a/source/selectors/regleSelectors.js b/source/selectors/regleSelectors.js index 94598b86e..7ab59da68 100644 --- a/source/selectors/regleSelectors.js +++ b/source/selectors/regleSelectors.js @@ -7,7 +7,7 @@ import { createSelector } from 'reselect' import { branchAnalyseSelector, flatRulesSelector, - validatedSituationBranchesSelector + situationsWithDefaultsSelector } from './analyseSelectors' import type { FlatRules } from 'Types/State' import type { @@ -57,7 +57,7 @@ export const règleValeurSelector: InputSelector< (dottedName: string) => RègleValeur > = createSelector( branchAnalyseSelector, - validatedSituationBranchesSelector, + situationsWithDefaultsSelector, règleLocaliséeSelector, (analysis: Analysis, situation, règleLocalisée: string => Règle) => ( dottedName: string @@ -72,8 +72,6 @@ export const règleValeurSelector: InputSelector< (analysis.cache[dottedName] || analysis.targets.find(target => target.dottedName === dottedName)) - if (rule == undefined) return null - let valeur = rule && !isNil(rule.nodeValue) ? rule.nodeValue