Skip to content

Commit

Permalink
fix int version of the values
Browse files Browse the repository at this point in the history
  • Loading branch information
borosr committed Jul 14, 2024
1 parent 955e42b commit 4d92f12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gwservices/fp-money",
"version": "2.0.0",
"version": "2.0.1",
"private": false,
"description": "Input formatter and currency selector",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/fp-money/fp-money.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class FPMoney {
const fraction = this.currencies[this.currency].fraction

// Check if value is a fraction
if (!this.isFraction(value) && this.valueFormat === 'int') {
if (this.isFraction(value) && this.valueFormat === 'int') {
value = intToFraction(value, fraction).toString()
} else if (this.isFraction(value) && this.valueFormat === 'float') {
value = fractionToInt(value, fraction).toString()
Expand Down

0 comments on commit 4d92f12

Please sign in to comment.