Skip to content

Commit

Permalink
change variable type
Browse files Browse the repository at this point in the history
  • Loading branch information
ngvtuan committed Nov 7, 2023
1 parent 5ed1f35 commit 2421978
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Summary/Summary.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export const calculateDifference = (
second: string | number,
key: string,
) => {
const firstValue = Number(first.toString());
const secondValue = Number(second.toString());
const firstValue = parseFloat(first.toString());
const secondValue = parseFloat(second.toString());

const difference = ((firstValue - secondValue) / ((firstValue + secondValue) / 2)) * 100;

Expand Down

0 comments on commit 2421978

Please sign in to comment.