Skip to content

Commit

Permalink
function simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-89 committed Mar 16, 2024
1 parent 4516d3a commit 3d33f5b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ const limitDecimals = (
input: string | undefined,
fixed: number = 0
): string | undefined => {
if (input === undefined) return undefined
if (input === '0') return '0'
if (input === undefined || input === '0') return input

const num = parseFloat(input)

Expand Down

0 comments on commit 3d33f5b

Please sign in to comment.