diff --git a/src/statistiques/computeELPeriodStats.ts b/src/statistiques/computeELPeriodStats.ts index cf299e1..38940a3 100644 --- a/src/statistiques/computeELPeriodStats.ts +++ b/src/statistiques/computeELPeriodStats.ts @@ -78,7 +78,9 @@ function valueWithEvol( function evolPercent(current: number, previous: number | undefined): number { if (previous === undefined) return NaN; - return (100 * evol(current, previous)) / previous; + const evolValue = evol(current, previous); + if (evolValue === 0) return 0; + return (100 * evolValue) / previous; } function evol(current: number, previous: number | undefined): number {