From c6eb5de9a235942b612d3ea1abd90b62e41bbecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=9B=86?= <16908091@qq.com> Date: Mon, 7 Aug 2017 14:04:11 +0800 Subject: [PATCH] fix stepper prop validate bug --- components/Stepper/Stepper.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Stepper/Stepper.jsx b/components/Stepper/Stepper.jsx index 0a5b2fcb3..b5121347b 100644 --- a/components/Stepper/Stepper.jsx +++ b/components/Stepper/Stepper.jsx @@ -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({