Skip to content

Commit

Permalink
ISSUE andrewagain#40 bug-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethhess0320 committed Nov 15, 2021
1 parent c7fc306 commit b84159d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/logic/calculate.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ export default function calculate(obj, buttonName) {
.toString(),
};
}
// ISSUE 40 - Does not calculate the percentage after
// addition or subtraction or multiplication or division
if (obj.total) {
return {
total: Big(obj.total)
.div(Big("100"))
.toString(),
};
}
return {};
}

Expand Down

0 comments on commit b84159d

Please sign in to comment.