Skip to content

Commit

Permalink
修改BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangYaodong committed Jul 28, 2017
1 parent db6bd79 commit 84de779
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-tree",
"version": "1.1.4",
"version": "1.1.5",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Tree extends React.Component {
let selectedNodes = [];
MyUtils.traverseTree(treeData, (node, parent) => {
node.parentNode = parent;
if (selectedKeys.indexOf(node.key) !== -1) {
if (selectedKeys && selectedKeys.indexOf(node.key) !== -1) {
selectedNodes.push(node);
if (checkable && !checkStrictly) {
MyUtils.parentSelect(parent, selected, [], []);
Expand Down

0 comments on commit 84de779

Please sign in to comment.