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 @@ -84,7 +84,7 @@ function* treeWalker(refresh) {
84
84
const isOpened = yield refresh
85
85
? {
86
86
id,
87
- isLeaf: children? .length === 0 ,
87
+ isLeaf: ! children || children .length === 0 ,
88
88
isOpenByDefault: true ,
89
89
name,
90
90
nestingLevel,
@@ -93,7 +93,7 @@ function* treeWalker(refresh) {
93
93
94
94
// Basing on the node openness state we are deciding if we need to render
95
95
// the child nodes (if they exist).
96
- if (children? .length !== 0 && isOpened) {
96
+ if (children && children .length > 0 && isOpened) {
97
97
// Since it is a stack structure, we need to put nodes we want to render
98
98
// first to the end of the stack.
99
99
for (let i = children? .length - 1 ; i >= 0 ; i-- ) {
@@ -253,7 +253,7 @@ function* treeWalker(refresh) {
253
253
// object.
254
254
defaultHeight: 30 ,
255
255
id,
256
- isLeaf: children? .length === 0 ,
256
+ isLeaf: ! children || children .length === 0 ,
257
257
isOpenByDefault: true ,
258
258
name,
259
259
nestingLevel,
You can’t perform that action at this time.
0 commit comments