Skip to content

Commit

Permalink
chore: add missing semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
slipx06 committed Mar 24, 2024
1 parent 03b1da1 commit 7cda98c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ export class Utils {

if (unit === UnitOfPower.KILO_WATT && Math.abs(numberValue) < 1) {
return `${Math.round(numberValue * 1000)} W`;
}
};

if (unit === UnitOfPower.MEGA_WATT && Math.abs(numberValue) < 1) {
return `${(numberValue * 1000).toFixed(decimal)} kW`;
}
};

for (const rule of rules) {
if (Math.abs(numberValue) >= rule.threshold) {
const convertedValue = (numberValue / rule.divisor).toFixed(rule.decimal || decimal);
return `${convertedValue} ${rule.targetUnit}`;
}
}
};

return `${numberValue.toFixed(decimal)} ${unit}`;
}
Expand Down

0 comments on commit 7cda98c

Please sign in to comment.