File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class Tree extends React.Component {
2121 }
2222
2323 onCheck ( node ) {
24- const { checked } = this . props ;
24+ const checked = [ ... this . props . checked ] ;
2525 const isChecked = node . checked ;
2626
2727 this . setCheckState ( checked , node , isChecked ) ;
@@ -31,7 +31,7 @@ class Tree extends React.Component {
3131
3232 onExpand ( node ) {
3333 const isExpanded = node . expanded ;
34- const expanded = this . props . expanded ;
34+ const expanded = [ ... this . props . expanded ] ;
3535 const nodeIndex = expanded . indexOf ( node . value ) ;
3636
3737 if ( ! isExpanded && nodeIndex > - 1 ) {
@@ -119,7 +119,7 @@ class Tree extends React.Component {
119119 }
120120
121121 hasChildren ( node ) {
122- if ( typeof node . children !== 'object' ) {
122+ if ( node . children === undefined ) {
123123 return false ;
124124 }
125125
You can’t perform that action at this time.
0 commit comments