Skip to content

Commit

Permalink
adjust percent max
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaviano-Rodrigues committed Dec 4, 2024
1 parent 33cced3 commit e7410d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flaformatter",
"version": "2.1.0",
"version": "2.1.1",
"description": "A formatter to easily your code",
"homepage": "https://github.com/Flaviano-Rodrigues/flaformatter",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ const flaformatter = (
max(16)
break
case 'percent':
// 12.34% com limite até 100%
// 12.34%
let percentValue = parseFloat(val.replace(',', '.'))

percentValue = percentValue / 100

if (percentValue > 100) {
if (setMax && percentValue > 100) {
percentValue = 100
}

Expand Down

0 comments on commit e7410d4

Please sign in to comment.