Skip to content

Commit

Permalink
code review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniave committed Nov 19, 2024
1 parent 36fc6fc commit 1ef179f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packages/core/NumberParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class NumberParser {
const parsedNumberString = numberString
.replace(this.groupingRegexPattern, "")
.replace(this.decimalRegexPattern, ".");
return !numberString ? NaN : +parsedNumberString;
return !parsedNumberString ? NaN : +parsedNumberString;
}

// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#escaping
Expand Down

0 comments on commit 1ef179f

Please sign in to comment.