Skip to content

Commit

Permalink
fix stepper prop validate bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed Aug 7, 2017
1 parent 88cf17b commit c6eb5de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Stepper/Stepper.jsx
Expand Up @@ -44,10 +44,10 @@ class Stepper extends PureComponent {
if (value === '' || isNaN(value)) {
value = this.state.lastValue;
}
if (typeof min === 'number' && value < min) {
if (min !== null && value < min) {
value = min;
}
if (typeof max === 'number' && value > max) {
if (max !== null && value > max) {
value = max;
}
this.setState({
Expand Down

0 comments on commit c6eb5de

Please sign in to comment.