aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorafc163 <afc163@gmail.com>2016-11-11 12:05:02 +0800
committerafc163 <afc163@gmail.com>2016-11-11 12:05:02 +0800
commitcb5a445c75c7117c7c705d615099086274c2b254 (patch)
tree86024a93b43079c2ce843371683720b60d2746a1
parent840e3d48a0a6f0d626d2cc2dfc63fd8a5e17d056 (diff)
downloadtime-picker-cb5a445c75c7117c7c705d615099086274c2b254.tar.gz
time-picker-cb5a445c75c7117c7c705d615099086274c2b254.tar.zst
time-picker-cb5a445c75c7117c7c705d615099086274c2b254.zip
Fix list null error (ant-design/ant-design#3793)
-rw-r--r--src/module/Select.jsx3
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;