Skip to content

Commit

Permalink
Use parse float directly
Browse files Browse the repository at this point in the history
Signed-off-by: Zabil Cheriya Maliackal <[email protected]>
  • Loading branch information
zabil committed Jul 1, 2024
1 parent c5a717e commit 7901702
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gauge-ts/src/processors/params/PrimitiveParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export class PrimitiveParser implements ParameterParser {
}

private convertToNumber(value: string): number | undefined {
if (value.trim() === "") return undefined;
const num = Number(value);
const num = Number.parseFloat(value);
return Number.isNaN(num) ? undefined : num;
}

Expand Down

0 comments on commit 7901702

Please sign in to comment.