From ebdeec274f0b35583f5a3426aa3fcd1859a9b9d8 Mon Sep 17 00:00:00 2001 From: David Smadja <david.smadja@assemblee-nationale.fr> Date: Fri, 14 Feb 2025 18:06:46 +0100 Subject: [PATCH] Simplify getCalculatedVariableNumberValue --- src/lib/components/StandardOfLiving.svelte | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/lib/components/StandardOfLiving.svelte b/src/lib/components/StandardOfLiving.svelte index 65e4a2477..7b32a028a 100644 --- a/src/lib/components/StandardOfLiving.svelte +++ b/src/lib/components/StandardOfLiving.svelte @@ -44,20 +44,6 @@ variableName: string, populationId: string, ): number | undefined { - return getCalculatedVariableValue( - situation, - valuesByCalculationNameByVariableName, - variableName, - populationId, - ) as number | undefined - } - - function getCalculatedVariableValue( - situation: Situation, - valuesByCalculationNameByVariableName: ValuesByCalculationNameByVariableName, - variableName: string, - populationId: string, - ): VariableValue | undefined { const variable = variableSummaryByName[variableName] if (variable === undefined) { return undefined @@ -67,7 +53,7 @@ valuesByCalculationNameByVariableName, variable, populationId, - ).law + ).law as number | undefined } </script> -- GitLab