Skip to content

Commit cf3f0f6

Browse files
fix: fixing negative values verification on CurrencyInput
1 parent 7009a03 commit cf3f0f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/CurrencyInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export default React.forwardRef<TextInput, CurrencyInputProps>((props, ref) => {
2323

2424
const [startingWithSign, setStartingWithSign] = React.useState<'-' | '+'>();
2525

26-
const noNegativeValues = !!minValue && minValue > 0;
27-
const noPositiveValues = !!maxValue && maxValue < 0;
26+
const noNegativeValues = typeof minValue === 'number' && minValue >= 0;
27+
const noPositiveValues = typeof maxValue === 'number' && maxValue <= 0;
2828

2929
const formattedValue = React.useMemo(() => {
3030
if (!!value || value === 0 || value === -0) {

0 commit comments

Comments
 (0)