diff --git a/source/reducers/rootReducer.ts b/source/reducers/rootReducer.ts index e33702735..cee27f027 100644 --- a/source/reducers/rootReducer.ts +++ b/source/reducers/rootReducer.ts @@ -102,7 +102,6 @@ function updateSituation( function updateDefaultUnit(situation, { toUnit, analysis }) { const unit = parseUnit(toUnit) const goals = goalsFromAnalysis(analysis) - console.log(goals) const convertedSituation = Object.keys(situation) .map( dottedName => @@ -111,10 +110,11 @@ function updateDefaultUnit(situation, { toUnit, analysis }) { ) .filter( rule => - goals?.includes(rule.dottedName) && - (rule.unit || rule.defaultUnit) && - !rule.unité && - areUnitConvertible(rule.unit || rule.defaultUnit, unit) + rule.dottedName === 'entreprise . charges' || // HACK en attendant de revoir le fonctionnement des unités + (goals?.includes(rule.dottedName) && + (rule.unit || rule.defaultUnit) && + !rule.unité && + areUnitConvertible(rule.unit || rule.defaultUnit, unit)) ) .reduce( (convertedSituation, rule) => ({