Skip to content

Commit

Permalink
fix incorrect negative value conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed Jul 9, 2024
1 parent 1dfcdc2 commit 820aae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/common/utils/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ const Utils = Object.assign({}, require('./base/_utils'), {
}

const typedValue = testWithTrim ? str.trim() : str
const isNum = /^\d+$/.test(typedValue)
const isNum = /^-?\d+$/.test(typedValue)

if (isNum && parseInt(typedValue) > Number.MAX_SAFE_INTEGER) {
return `${str}`
Expand Down

0 comments on commit 820aae8

Please sign in to comment.