Skip to content

Commit

Permalink
BRS-652-2 changing logical nullish assignment (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronpettit authored Sep 14, 2022
1 parent 64cb94f commit 53f4c90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lambda/formulaUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ function basicNetRevenue(revenues, customPercent) {

function totalWithModifier(arr, mod) {
let result = arraySum(arr);
result ??= null;
if (result === undefined) {
result = null;
}
if (mod || mod === 0) {
result *= mod;
}
Expand Down

0 comments on commit 53f4c90

Please sign in to comment.