diff options
author | afc163 <afc163@gmail.com> | 2016-11-11 12:05:02 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2016-11-11 12:05:02 +0800 |
commit | cb5a445c75c7117c7c705d615099086274c2b254 (patch) | |
tree | 86024a93b43079c2ce843371683720b60d2746a1 /src/module/Select.jsx | |
parent | 840e3d48a0a6f0d626d2cc2dfc63fd8a5e17d056 (diff) | |
download | time-picker-cb5a445c75c7117c7c705d615099086274c2b254.tar.gz time-picker-cb5a445c75c7117c7c705d615099086274c2b254.tar.zst time-picker-cb5a445c75c7117c7c705d615099086274c2b254.zip |
Fix list null error (ant-design/ant-design#3793)
Diffstat (limited to 'src/module/Select.jsx')
-rw-r--r-- | src/module/Select.jsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/module/Select.jsx b/src/module/Select.jsx index 2ab9e61..fa4e5c4 100644 --- a/src/module/Select.jsx +++ b/src/module/Select.jsx | |||
@@ -69,6 +69,9 @@ const Select = React.createClass({ | |||
69 | // move to selected item | 69 | // move to selected item |
70 | const select = ReactDom.findDOMNode(this); | 70 | const select = ReactDom.findDOMNode(this); |
71 | const list = ReactDom.findDOMNode(this.refs.list); | 71 | const list = ReactDom.findDOMNode(this.refs.list); |
72 | if (!list) { | ||
73 | return; | ||
74 | } | ||
72 | let index = this.props.selectedIndex; | 75 | let index = this.props.selectedIndex; |
73 | if (index < 0) { | 76 | if (index < 0) { |
74 | index = 0; | 77 | index = 0; |