Skip to content

Commit

Permalink
fix(ecoindex): corrige le nan dans la version definitive
Browse files Browse the repository at this point in the history
  • Loading branch information
titiBeOne authored Feb 16, 2024
1 parent 236ca49 commit 5200e44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
corrige le nan dans ecoindex
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lighthouse-eco-index-aggregator",
"version": "1.0.0",
"version": "1.0.2",
"description": "Tool for aggregating lighthouse and eco-index results",
"main": "src/cli.js",
"private": false,
Expand Down
4 changes: 2 additions & 2 deletions src/ecoIndex/aggregatorService.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const readFiles = (options, ecoIndexJsonReportsFiles) => {
if (result.pages[0]) {
const page = result.pages[0];
ecoIndex += page.ecoIndex;
greenhouseGases += page.greenhouseGasesEmission;
water += page.waterConsumption;
greenhouseGases += parseFloat(page.greenhouseGasesEmission);
water += parseFloat(page.waterConsumption);
greenhouseGasesKm += page.estimatation_co2?.commentDetails?.value_km ?? 0;
waterShower += page.estimatation_water?.commentDetails?.value_shower ?? 0;
waterNumberOfVisits +=
Expand Down

0 comments on commit 5200e44

Please sign in to comment.