Skip to content

Commit 100e515

Browse files
authored
Merge pull request #3666 from Vizzuality/fix/loss-area-calc
Update plantationsloss calc
2 parents 5b8242a + ba3ad04 commit 100e515

File tree

1 file changed

+1
-2
lines changed
  • app/javascript/components/widgets/widgets/forest-change/tree-loss-plantations

1 file changed

+1
-2
lines changed

app/javascript/components/widgets/widgets/forest-change/tree-loss-plantations/selectors.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const parseData = createSelector(
3939
...d,
4040
outsideAreaLoss: totalLossForYear.area - summedPlatationsLoss,
4141
areaLoss: summedPlatationsLoss || 0,
42-
totalLoss: totalLossForYear || 0,
42+
totalLoss: totalLossForYear.area || 0,
4343
outsideCo2Loss:
4444
totalLossByYear[d.year][0].emissions - summedPlatationsEmissions,
4545
co2Loss: summedPlatationsEmissions || 0
@@ -104,7 +104,6 @@ export const parseSentence = createSelector(
104104
plantationsLoss > outsideLoss
105105
? 100 * plantationsLoss / totalLoss
106106
: 100 * outsideLoss / totalLoss;
107-
108107
const params = {
109108
location: locationName,
110109
startYear,

0 commit comments

Comments
 (0)