Better number handling
This commit is contained in:
parent
9d6fc961de
commit
8b7c7ecb33
@ -39,8 +39,13 @@ function Addresses(props: AddressesProps) {
|
|||||||
setInputState("");
|
setInputState("");
|
||||||
}
|
}
|
||||||
|
|
||||||
const num = isNaN(numTokens) ? 0 : numTokens;
|
var num;
|
||||||
|
if (isNan(numTokens) || numTokens < 0) {
|
||||||
|
num = 0;
|
||||||
|
} else {
|
||||||
|
num = numTokens;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user