Skip to content

Commit b2b3bc9

Browse files
committed
fix regression from last one #24
1 parent 32fa001 commit b2b3bc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pickers/numberpicker.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ var NumberPicker = React.createClass({
220220

221221
change: function(val){
222222
val = this.inRangeValue(val === '' ? null : val)
223-
223+
224224
if ( this.props.value !== val )
225225
this.notify('onChange', val)
226226
},
@@ -229,7 +229,7 @@ var NumberPicker = React.createClass({
229229
var max = this.props.max == null ? Infinity : this.props.max
230230
, min = this.props.min == null ? -Infinity : this.props.min;
231231

232-
if( value == null )
232+
if( !_.isFinite(min) && value == null )
233233
return value
234234

235235
return Math.max(Math.min(value, max), min)

0 commit comments

Comments
 (0)