Skip to content

Commit

Permalink
fix(number input): add correct handling of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsJohansen87 committed Jun 13, 2024
1 parent b008abf commit 6cdb595
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
? element.max
: null;
if (min && from <= min) {
if (min !== null && from <= min) {
from = min;
} else if (max && from >= max) {
} else if (max !== null && from >= max) {
from = max;
}
};
Expand All @@ -54,9 +54,9 @@
? element.max
: null;
if (min && to <= min) {
if (min !== null && to <= min) {
to = min;
} else if (max && to >= max) {
} else if (max !== null && to >= max) {
to = max;
}
};
Expand Down

0 comments on commit 6cdb595

Please sign in to comment.