Skip to content

Commit

Permalink
LANDGRIF-1628 - Add tmp conditional for when neither prod and distrib…
Browse files Browse the repository at this point in the history
…uted impact exists
  • Loading branch information
alexeh committed Feb 23, 2025
1 parent e1ffc39 commit 32e2626
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export class ImpactCalculator {
return rawData.production > 0
? (rawData[INDICATOR_NAME_CODES.WGUWU] * waterWithdrawalValue) /
(100 * rawData.production) || 0
: rawData.distributedImpact![INDICATOR_NAME_CODES.WGUWU] *
: (rawData.distributedImpact?.[INDICATOR_NAME_CODES.WGUWU] ?? 0) *
(waterWithdrawalValue / 100) || 0;
},
};
Expand Down

0 comments on commit 32e2626

Please sign in to comment.