From 4eb849c7835710ca856df140c73f141807fab04d Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 29 Jul 2015 15:29:29 +0800 Subject: [PATCH] fix boolean expression always true --- components/modal/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal/index.jsx b/components/modal/index.jsx index eabbde5b13..5d5d8d8d1a 100644 --- a/components/modal/index.jsx +++ b/components/modal/index.jsx @@ -28,7 +28,7 @@ export default React.createClass({ this.setState({ confirmLoading: true }); - if (typeof this.props.onOk) { + if (typeof this.props.onOk === 'function') { this.props.onOk(); } },