Skip to content

Commit

Permalink
Merge pull request #472 from bandada-infra/aguzmant103/issue435
Browse files Browse the repository at this point in the history
refactor(general info step): prevents NaN values to getting input to …
  • Loading branch information
aguzmant103 authored Apr 3, 2024
2 parents 2920f64 + 41a501e commit 4afe4a0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ export default function GeneralInfoStep({
size="lg"
value={_fingerprintDuration}
onChange={(value) =>
setFingerprintDuration(Number(value))
!Number.isNaN(Number(value)) &&
Number(value) >= 0
? setFingerprintDuration(Number(value))
: null
}
onBlur={() =>
onSubmit(
Expand Down Expand Up @@ -205,7 +208,6 @@ export default function GeneralInfoStep({
!_groupName ||
(group.type === "off-chain" &&
(_fingerprintDuration === undefined ||
Number.isNaN(_fingerprintDuration) ||
!_groupDescription ||
_groupDescription.length < 10)) ||
_fingerprintDuration < 0
Expand Down

0 comments on commit 4afe4a0

Please sign in to comment.